busybox/applets/install.sh

26 lines
526 B
Bash
Raw Normal View History

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