X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=support%2Ffixlinks;h=bc286e5a9df37a8d0b58bf36513786c0000fc8c8;hb=ccc6cda312fea9f0468ee65b8f368e9653e1380b;hp=b82ca4ddff55931759ff0e04ef46f7c75175f437;hpb=726f63884db0132f01745f1fb4465e6621088ccf;p=platform%2Fupstream%2Fbash.git diff --git a/support/fixlinks b/support/fixlinks index b82ca4d..bc286e5 100755 --- a/support/fixlinks +++ b/support/fixlinks @@ -10,8 +10,9 @@ while [ $# -gt 0 ]; do case "$1" in -s) shift; SRCDIR=$1 ;; -u) unfix=yes ;; + -h) hardlinks=yes ;; -*) echo "$0: $1: bad option" 1>&2 - echo "$0: usage: $0 [-u] [-s srcdir] [linkmap]" 1>&2 + echo "$0: usage: $0 [-hu] [-s srcdir] [linkmap]" 1>&2 exit 1;; *) break ;; esac @@ -35,11 +36,16 @@ if [ ! -f "$linkfile" ]; then fi rm -f /tmp/z -if (ln -s /dev/null /tmp/z) >/dev/null 2>&1; then +# if the user specified hard links, then do that. otherwise, try to use +# symlinks if they're present +if [ -n "$hardlinks" ]; then + LN=ln +elif (ln -s /dev/null /tmp/z) >/dev/null 2>&1; then LN="ln -s" else LN=ln fi +rm -f /tmp/z while read name target do