blob: 9721102a1a67c16b581f9834dfa06a24d30d60d9 [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 +000010h=`sort busybox.links | uniq`
Eric Anderseneded54b1999-11-12 08:03:23 +000011
Eric Anderseneded54b1999-11-12 08:03:23 +000012for i in $h ; do
Eric Andersen0f4c0841999-11-22 05:57:09 +000013 echo "Symlinking $i to /bin/busybox"
Eric Andersen6a76e651999-11-19 05:31:45 +000014 mypath=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `;
15 myapp=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `;
Eric Andersen6a76e651999-11-19 05:31:45 +000016 mkdir -p $1$mypath
Eric Andersen0f4c0841999-11-22 05:57:09 +000017 (cd $1$mypath ; rm -f $1$mypath$myapp ; ln -s /bin/busybox $1$mypath$myapp )
Eric Anderseneded54b1999-11-12 08:03:23 +000018done
19rm -f $1/bin/busybox
20install -m 755 busybox $1/bin/busybox
21
Eric Andersen6a76e651999-11-19 05:31:45 +000022