hush/applets/install.sh

23 lines
468 B
Bash
Raw Normal View History

1999-11-12 08:03:23 +00:00
#!/bin/sh
1999-11-15 17:33:30 +00:00
set -e
1999-11-12 08:03:23 +00:00
if [ "$1" == "" ]; then
1999-11-15 17:33:30 +00:00
echo "No installation directory, aborting."
1999-11-12 08:03:23 +00:00
exit 1;
fi
1999-11-15 17:33:30 +00:00
h=`sort busybox.links | uniq`
1999-11-12 08:03:23 +00:00
for i in $h ; do
1999-11-19 05:31:45 +00:00
mypath=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `;
myapp=`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' `;
mkdir -p $1$mypath
1999-11-22 06:01:01 +00:00
echo " $1$mypath$myapp -> /bin/busybox"
1999-11-22 05:57:09 +00:00
(cd $1$mypath ; rm -f $1$mypath$myapp ; ln -s /bin/busybox $1$mypath$myapp )
1999-11-12 08:03:23 +00:00
done
rm -f $1/bin/busybox
install -m 755 busybox $1/bin/busybox
1999-11-19 05:31:45 +00:00