Stuf
[oweals/busybox.git] / applets / 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 rm -rf $1
10
11 h=`sort busybox.links | uniq`
12
13 for i in $h ; do
14         echo "working on $i now"
15         mypath=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `;
16         myapp=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `;
17         echo "mkdir -p $1$mypath"
18         echo "(cd $1$mypath ; ln -s /bin/busybox $1$mypath$myapp )"
19         mkdir -p $1$mypath
20         (cd $1$mypath ; ln -s /bin/busybox $1$mypath$myapp )
21 done
22 rm -f $1/bin/busybox
23 install -m 755 busybox $1/bin/busybox
24
25