diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-23 21:11:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-23 21:11:53 +0000 |
commit | a800017648ea42670cf384c2386d0673b0e71860 (patch) | |
tree | 28229cf4fd0a2012a051c72790a8463b10b6e9f3 /Master/tlpkg | |
parent | 71dd1921e1ce6b54875c2f06c7b46836fedd9e1f (diff) |
missing x bit; deref-symlinks arg parsing
git-svn-id: svn://tug.org/texlive/trunk@68036 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-x | Master/tlpkg/bin/deref-symlinks | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Master/tlpkg/bin/deref-symlinks b/Master/tlpkg/bin/deref-symlinks index b012f7d748e..699786163cc 100755 --- a/Master/tlpkg/bin/deref-symlinks +++ b/Master/tlpkg/bin/deref-symlinks @@ -5,8 +5,9 @@ # Replace symlinks to files with the actual files. # Symlinks to anything else are not touched. -if test "x$1" = --save-links; then +if test x"$1" = x--save-links; then savelinks=true + shift else savelinks=false fi @@ -16,7 +17,7 @@ for f in "$@"; do test -f "$f" || continue # skip links to anything but regular files cp -p --dereference "$f" "$f".file # expand link - mv "$f" "$f".link # move link out of the way - mv -v "$f".file "$f" # replace with regular file - $savelinks || rm "$f".link # remove link unless keeping + mv -v "$f" "$f".link # move link out of the way + mv -v "$f".file "$f" # replace with regular file + $savelinks || rm "$f".link # remove link unless keeping done |