KO Myung-Hun wrote:
+# Check if symbolic link is supported
+have_symlink_support=false
+rm -f symlink$$.file symlink$$
+if (echo >symlink$$.file) 2>/dev/null; then
+ if ln -s symlink$$.file symlink$$ 2>/dev/null; then
+ have_symlink_support=true
+ fi
+fi
+rm -f symlink$$.file symlink$$
There's no need to use the echo; just use ln -s (the target need not exist).
Also, this test should be done dynamically, when the actual ln -s is run, not at
the start of the run. That is because 'ln -s' might succeed on some file
systems but not on others. It's OK to output a warning for the first ln -s that
is replaced by a cp, but I wouldn't warn for each one.