Latest and greatest
[oweals/busybox.git] / install.sh
1 #!/bin/sh
2
3 set -e
4
5 if [ "$1" == "" ]; then
6     echo "No installation directory, aborting."
7     exit 1;
8 fi
9
10 # can't just use cat, rmdir is not unique
11 #h=`cat busybox.links`
12 h=`sort busybox.links | uniq`
13
14 mkdir -p $1/bin
15 for i in $h ; do
16         [ ${verbose} ] && echo "  making link to $i"
17         mkdir -p $1/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
18         ln -s busybox $1/bin/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `
19 done
20 rm -f $1/bin/busybox
21 install -m 755 busybox $1/bin/busybox
22