Update internal.h to conditionally include asm/string.h
[oweals/busybox.git] / install.sh
index 458e65ce9323dbfc32544aa4ca0f765dc0731d84..65190f59d85b10ed6f1bd18c4c63f13b1c5505c2 100755 (executable)
@@ -2,7 +2,7 @@
 
 set -e
 
-if [ "$1" == "" ]; then
+if [ "$1" = "" ]; then
     echo "No installation directory, aborting."
     exit 1;
 fi
@@ -10,13 +10,12 @@ fi
 h=`sort busybox.links | uniq`
 
 for i in $h ; do
-       mypath=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `;
-       myapp=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `;
-       echo "  $1$mypath$myapp -> /bin/busybox"
-       mkdir -p $1$mypath
-       (cd $1$mypath && rm -f $1$mypath$myapp && ln -s /bin/busybox $1$mypath$myapp )
+       echo "  $1$i -> /bin/busybox"
+       mkdir -p $1/`echo $i | sed -e 's/\/[^\/]*$//' `
+       ln -fs /bin/busybox $1$i
 done
 rm -f $1/bin/busybox
+mkdir -p $1/bin
 install -m 755 busybox $1/bin/busybox
 
 exit 0