Skip to content

Commit

Permalink
Better fix for symlinks
Browse files Browse the repository at this point in the history
Better fix for symlinks

This is a better fix for finding symlinks.  This uses the `find` option "-L" to follow the symlink, but return the path using the symlink.  Although, it may be better to use the "-H" option to return the path to the linked file as it will keep `list_path` from returning the two identical files if the symlink points to a file in the same search path.
  • Loading branch information
underwoo committed Jun 30, 2016
1 parent 8895cac commit 309d50d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/list_paths
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ set outdoc = "$out.html"

touch $out # create the file if it doesn't exist
cp $out $src
find $* \( -type f -o -type l \) -a \
find -L $* -type f \
\( -name \*.c \
-o -name \*.C \
-o -name \*.f \
Expand All @@ -72,7 +72,7 @@ sed 's:.*/\(.*\):\0 \1:' $src | nl | sort --key 3 -u | sort -n | awk '{print $2}
echo "A list of the files you checked out is in the file $out ..."
touch $doc # create the file if it doesn't exist
find $* \( -type f -o -type l \) -a \
find -L $* -type f \
\( -name \*.html \
-o -name \*.ps \
-o -name \*.txt \
Expand Down

0 comments on commit 309d50d

Please sign in to comment.