1999-01-18 02:54:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
# Try to create a symlink with backup where the destination file exists
|
|
|
|
|
# and the backup file name is a hard link to the destination file.
|
|
|
|
|
# Based on a problem report from Jamie Lokier.
|
|
|
|
|
|
|
|
|
|
if test "$VERBOSE" = yes; then
|
|
|
|
|
set -x
|
|
|
|
|
ln --version
|
|
|
|
|
fi
|
|
|
|
|
|
1999-01-18 18:33:58 +00:00
|
|
|
trap "rm -rf a b b~" 0 1 2 3 15
|
|
|
|
|
|
1999-01-18 02:54:56 +00:00
|
|
|
framework_failure=0
|
|
|
|
|
touch a b || framework_failure=1
|
|
|
|
|
|
|
|
|
|
if test $framework_failure = 1; then
|
|
|
|
|
echo 'failure in testing framework'
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
ln b b~ || fail=1
|
1999-11-07 10:47:52 +00:00
|
|
|
ln -f --b=simple a b || fail=1
|
1999-01-18 02:54:56 +00:00
|
|
|
|
|
|
|
|
exit $fail
|