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 | # can't just use cat, rmdir is not unique |
| 11 | #h=`cat busybox.links` |
| 12 | h=`sort busybox.links | uniq` |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 13 | |
| 14 | mkdir -p $1/bin |
| 15 | for i in $h ; do |
Eric Andersen | a9c95ea | 1999-11-15 17:33:30 +0000 | [diff] [blame^] | 16 | [ ${verbose} ] && echo " making link to $i" |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 17 | mkdir -p $1/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' ` |
Eric Andersen | a9c95ea | 1999-11-15 17:33:30 +0000 | [diff] [blame^] | 18 | ln -s busybox $1/bin/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' ` |
Eric Andersen | eded54b | 1999-11-12 08:03:23 +0000 | [diff] [blame] | 19 | done |
| 20 | rm -f $1/bin/busybox |
| 21 | install -m 755 busybox $1/bin/busybox |
| 22 | |