7 if [ -z "$prefix" ]; then
8 echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks]"
11 h=`sort busybox.links | uniq`
13 --hardlinks) linkopts="-f";;
14 --symlinks) linkopts="-fs";;
16 *) echo "Unknown install option: $2"; exit 1;;
19 if [ "$DO_INSTALL_LIBS" != "n" ]; then
20 # get the target dir for the libs
21 # This is an incomplete/incorrect list for now
23 x86_64|ppc64*|sparc64*|ia64*|hppa*64*) libdir=/lib64 ;;
27 mkdir -p $prefix/$libdir || exit 1
28 for i in $DO_INSTALL_LIBS; do
29 rm -f $prefix/$libdir/$i || exit 1
31 install -m 644 $i $prefix/$libdir/ || exit 1
35 rm -f $prefix/bin/busybox || exit 1
36 mkdir -p $prefix/bin || exit 1
37 install -m 755 busybox $prefix/bin/busybox || exit 1
41 mkdir -p $prefix/$appdir || exit 1
42 if [ "$2" = "--hardlinks" ]; then
43 bb_path="$prefix/bin/busybox"
53 bb_path="../bin/busybox"
56 bb_path="../../bin/busybox"
59 echo "Unknown installation directory: $appdir"
64 echo " $prefix$i -> $bb_path"
65 ln $linkopts $bb_path $prefix$i || exit 1