aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapplets/install.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/applets/install.sh b/applets/install.sh
index 1cd97bba3..4ec96c254 100755
--- a/applets/install.sh
+++ b/applets/install.sh
@@ -10,10 +10,12 @@ if [ -z "$prefix" ]; then
10fi 10fi
11h=`sort busybox.links | uniq` 11h=`sort busybox.links | uniq`
12cleanup="0" 12cleanup="0"
13noclobber="0"
13case "$2" in 14case "$2" in
14 --hardlinks) linkopts="-f";; 15 --hardlinks) linkopts="-f";;
15 --symlinks) linkopts="-fs";; 16 --symlinks) linkopts="-fs";;
16 --cleanup) cleanup="1";; 17 --cleanup) cleanup="1";;
18 --noclobber) noclobber="1";;
17 "") h="";; 19 "") h="";;
18 *) echo "Unknown install option: $2"; exit 1;; 20 *) echo "Unknown install option: $2"; exit 1;;
19esac 21esac
@@ -81,8 +83,12 @@ for i in $h ; do
81 ;; 83 ;;
82 esac 84 esac
83 fi 85 fi
84 echo " $prefix$i -> $bb_path" 86 if [ "$noclobber" = "0" ] || [ ! -e "$prefix$i" ]; then
85 ln $linkopts $bb_path $prefix$i || exit 1 87 echo " $prefix$i -> $bb_path"
88 ln $linkopts $bb_path $prefix$i || exit 1
89 else
90 echo " $prefix$i already exists"
91 fi
86done 92done
87 93
88exit 0 94exit 0