Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Eric Andersen | a9c95ea | 1999-11-15 17:33:30 +0000 | [diff] [blame] | 3 | set -e |
| 4 | |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 5 | if [ "$1" == "" ]; then |
Eric Andersen | a9c95ea | 1999-11-15 17:33:30 +0000 | [diff] [blame] | 6 | echo "No installation directory, aborting." |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 7 | exit 1; |
| 8 | fi |
| 9 | |
Eric Andersen | a9c95ea | 1999-11-15 17:33:30 +0000 | [diff] [blame] | 10 | h=`sort busybox.links | uniq` |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 11 | |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 12 | for i in $h ; do |
Eric Andersen | 6a76e65 | 1999-11-19 05:31:45 +0000 | [diff] [blame] | 13 | mypath=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `; |
| 14 | myapp=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `; |
Eric Andersen | 5d44d1f | 1999-11-22 06:01:01 +0000 | [diff] [blame] | 15 | echo " $1$mypath$myapp -> /bin/busybox" |
Eric Andersen | cb41c2e | 1999-11-22 07:41:00 +0000 | [diff] [blame] | 16 | mkdir -p $1$mypath |
| 17 | (cd $1$mypath && rm -f $1$mypath$myapp && ln -s /bin/busybox $1$mypath$myapp ) |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 18 | done |
| 19 | rm -f $1/bin/busybox |
| 20 | install -m 755 busybox $1/bin/busybox |
| 21 | |
Eric Andersen | cb41c2e | 1999-11-22 07:41:00 +0000 | [diff] [blame] | 22 | exit 0 |