Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/applets/install.sh

    r1765 r2725  
    66prefix=${1}
    77if [ -z "$prefix" ]; then
    8     echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks]"
     8    echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]"
    99    exit 1;
    1010fi
    1111h=`sort busybox.links | uniq`
     12scriptwrapper="n"
    1213cleanup="0"
    1314noclobber="0"
    1415case "$2" in
    15     --hardlinks) linkopts="-f";;
    16     --symlinks)  linkopts="-fs";;
    17     --cleanup)   cleanup="1";;
    18     --noclobber) noclobber="1";;
    19     "")          h="";;
    20     *)           echo "Unknown install option: $2"; exit 1;;
     16    --hardlinks)     linkopts="-f";;
     17    --symlinks)      linkopts="-fs";;
     18    --scriptwrapper) scriptwrapper="y";swrapall="y";;
     19    --sw-sh-hard)    scriptwrapper="y";linkopts="-f";;
     20    --sw-sh-sym)     scriptwrapper="y";linkopts="-fs";;
     21    --cleanup)       cleanup="1";;
     22    --noclobber)     noclobber="1";;
     23    "")              h="";;
     24    *)               echo "Unknown install option: $2"; exit 1;;
    2125esac
    2226
     
    3438        rm -f $prefix/$libdir/$i || exit 1
    3539        if [ -f $i ]; then
    36             cp -a $i $prefix/$libdir/ || exit 1
     40            cp -pPR $i $prefix/$libdir/ || exit 1
    3741            chmod 0644 $prefix/$libdir/$i || exit 1
    3842        fi
     
    5357    done
    5458    `
     59    exit 0
    5560fi
    5661
     
    6267    appdir=`dirname $i`
    6368    mkdir -p $prefix/$appdir || exit 1
    64     if [ "$2" = "--hardlinks" ]; then
    65         bb_path="$prefix/bin/busybox"
     69    if [ "$scriptwrapper" = "y" ]; then
     70        if [ "$swrapall" != "y" ] && [ "$i" = "/bin/sh" ]; then
     71            ln $linkopts busybox $prefix$i || exit 1
     72        else
     73            rm -f $prefix$i
     74            echo "#!/bin/busybox" > $prefix$i
     75            chmod +x $prefix/$i
     76        fi
     77        echo "  $prefix$i"
    6678    else
    67         case "$appdir" in
    68         /)
    69             bb_path="bin/busybox"
    70         ;;
    71         /bin)
    72             bb_path="busybox"
    73         ;;
    74         /sbin)
    75             bb_path="../bin/busybox"
    76         ;;
    77         /usr/bin|/usr/sbin)
    78             bb_path="../../bin/busybox"
    79         ;;
    80         *)
    81         echo "Unknown installation directory: $appdir"
    82         exit 1
    83         ;;
    84         esac
    85     fi
    86     if [ "$noclobber" = "0" ] || [ ! -e "$prefix$i" ]; then
    87         echo "  $prefix$i -> $bb_path"
    88         ln $linkopts $bb_path $prefix$i || exit 1
    89     else
    90         echo "  $prefix$i already exists"
     79        if [ "$2" = "--hardlinks" ]; then
     80            bb_path="$prefix/bin/busybox"
     81        else
     82            case "$appdir" in
     83            /)
     84                bb_path="bin/busybox"
     85            ;;
     86            /bin)
     87                bb_path="busybox"
     88            ;;
     89            /sbin)
     90                bb_path="../bin/busybox"
     91            ;;
     92            /usr/bin|/usr/sbin)
     93                bb_path="../../bin/busybox"
     94            ;;
     95            *)
     96            echo "Unknown installation directory: $appdir"
     97            exit 1
     98            ;;
     99            esac
     100        fi
     101        if [ "$noclobber" = "0" ] || [ ! -e "$prefix$i" ]; then
     102            echo "  $prefix$i -> $bb_path"
     103            ln $linkopts $bb_path $prefix$i || exit 1
     104        else
     105            echo "  $prefix$i already exists"
     106        fi
    91107    fi
    92108done
Note: See TracChangeset for help on using the changeset viewer.