##// END OF EJS Templates
Use test -h instead of test -L for portability...
Use test -h instead of test -L for portability Citing from the GNU autoconf manual: "either form conforms to Posix 1003.1-2001, but older shells like Solaris 8 /bin/sh support only -h"

File last commit:

r5682:048889f8 default
r5682:048889f8 default
Show More
test-merge-types
36 lines | 471 B | text/plain | TextLexer
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 #!/bin/sh
hg init
echo a > a
hg ci -Amadd
chmod +x a
hg ci -mexecutable
hg up 0
rm a
ln -s symlink a
hg ci -msymlink
hg merge
echo % symlink is left parent, executable is right
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
readlink a
elif [ -x a ]; then
echo a is executable
fi
hg update -C 1
hg merge
echo % symlink is right parent, executable is left
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
readlink a
elif [ -x a ]; then
echo a is executable
fi