Here's a patch which fixes a problem with --symbolic/--symlink:
If target file does not exist during --import, gnulib-tool will
try to remove it resulting in an error. One way to fix this, the
one used here, is to rm -f. Another one would be to use ln -s -f
without the rm (is ln -f portable?). A third one to would be to
check before running rm at all. I don't know which one is to
prefer...
The two other patch chunks are for adding -s.
2005-04-21 Oskar Liljeblad <[EMAIL PROTECTED]>
* gnulib-tool (Options): Add -s for --symlink/--symbolic.
(func_ln_if_changed) Remove forcibly for no error message
in case file does not exist.
Regards,
Oskar Liljeblad ([EMAIL PROTECTED])
Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.43
diff -u -p -r1.43 gnulib-tool
--- gnulib-tool 19 Apr 2005 07:52:49 -0000 1.43
+++ gnulib-tool 21 Apr 2005 16:18:45 -0000
@@ -95,7 +95,7 @@ Options:
--libtool Use libtool rules, for --import.
--no-changelog don't update or create ChangeLog files
--dry-run For --import, only print what would have been done.
- --symbolic, --symlink Make symbolic links instead of copying files.
+ -s, --symbolic, --symlink Make symbolic links instead of copying files.
Report bugs to <[email protected]>."
}
@@ -168,7 +168,7 @@ func_ln_if_changed ()
if test -L "$2" -a "$1" = "`readlink "$2"`"; then
:
else
- $dry rm "$2"
+ $dry rm -f "$2"
$dry ln -s "$1" "$2"
fi
}
@@ -289,7 +289,7 @@ func_ln_if_changed ()
--dry-run )
dry_run=true
shift ;;
- --symbolic | --symlink )
+ -s | --symbolic | --symlink )
symbolic=true
shift ;;
--help | --hel | --he | --h )
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib