blob: 29c9e26d9e28acc2f90ca3f5be645e4ebeb257ed [file] [log] [blame]
Eric Anderseneded54b1999-11-12 08:03:23 +00001#!/bin/sh
2
Eric Andersena9c95ea1999-11-15 17:33:30 +00003set -e
4
Eric Anderseneded54b1999-11-12 08:03:23 +00005if [ "$1" == "" ]; then
Eric Andersena9c95ea1999-11-15 17:33:30 +00006 echo "No installation directory, aborting."
Eric Anderseneded54b1999-11-12 08:03:23 +00007 exit 1;
8fi
9
Eric Andersena9c95ea1999-11-15 17:33:30 +000010# can't just use cat, rmdir is not unique
11#h=`cat busybox.links`
12h=`sort busybox.links | uniq`
Eric Anderseneded54b1999-11-12 08:03:23 +000013
14mkdir -p $1/bin
15for i in $h ; do
Eric Andersena9c95ea1999-11-15 17:33:30 +000016 [ ${verbose} ] && echo " making link to $i"
Eric Anderseneded54b1999-11-12 08:03:23 +000017 mkdir -p $1/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
Eric Andersena9c95ea1999-11-15 17:33:30 +000018 ln -s busybox $1/bin/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `
Eric Anderseneded54b1999-11-12 08:03:23 +000019done
20rm -f $1/bin/busybox
21install -m 755 busybox $1/bin/busybox
22