getfpf (fslint-2.44) | : | getfpf (fslint-2.46) | ||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
# TODO: Have option when 1 dir specified | # TODO: Have option when 1 dir specified | |||
# which is not . or ./ or ./././. (use basename | # which is not . or ./ or ./././. (use basename | |||
# to reduce all these to .) then %p returned | # to reduce all these to .) then %p returned | |||
num_files=0 | num_files=0 | |||
files= | files= | |||
switches= | switches= | |||
onfindswitches=false | onfindswitches=false | |||
forcefullpath=false | forcefullpath=false | |||
eval set -- $* | eval set -- "$@" | |||
for arg in "$@"; | for arg in "$@"; | |||
do | do | |||
case "$arg" in | case "$arg" in | |||
-r) #turn OFF recursion | -r) #turn OFF recursion | |||
switches="$switches -maxdepth 1" ;; | switches="$switches -maxdepth 1" ;; | |||
#don't say onfindswitches=true since want to allow -r before paths | #don't say onfindswitches=true since want to allow -r before paths | |||
-f) #force full paths even if only 1 specified | -f) #force full paths even if only 1 specified | |||
forcefullpath=true ;; | forcefullpath=true ;; | |||
-*|\(|\)|!) #pass other switches onto find | -*|\(|\)|!) #pass other switches onto find | |||
switches="$switches '$arg'" | switches="$switches '$arg'" | |||
skipping to change at line 76 | skipping to change at line 76 | |||
eval files=$files #remove quotes | eval files=$files #remove quotes | |||
if [ -d "$files" ]; then | if [ -d "$files" ]; then | |||
cd "$files" | cd "$files" | |||
findArgs="$switches" | findArgs="$switches" | |||
else | else | |||
FPF="%p" | FPF="%p" | |||
fi | fi | |||
fi | fi | |||
fi | fi | |||
fi | fi | |||
eval set -- $findArgs | eval set -- "$findArgs" | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |