Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

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

    r3232 r3621  
    66prefix=$1
    77if [ -z "$prefix" ]; then
    8     echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]"
     8    echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]"
    99    exit 1
    1010fi
    1111
     12# Source the configuration
     13. ./.config
     14
    1215h=`sort busybox.links | uniq`
     16
     17sharedlib_dir="0_lib"
    1318
    1419linkopts=""
    1520scriptwrapper="n"
     21binaries="n"
    1622cleanup="0"
    1723noclobber="0"
     
    1925    --hardlinks)     linkopts="-f";;
    2026    --symlinks)      linkopts="-fs";;
     27    --binaries)      binaries="y";;
    2128    --scriptwrapper) scriptwrapper="y";swrapall="y";;
    2229    --sw-sh-hard)    scriptwrapper="y";linkopts="-f";;
     
    4148        rm -f "$prefix/$libdir/$i" || exit 1
    4249        if [ -f "$i" ]; then
     50            echo "   Installing $i to the target at $prefix/$libdir/"
    4351            cp -pPR "$i" "$prefix/$libdir/" || exit 1
    44             chmod 0644 "$prefix/$libdir/$i" || exit 1
     52            chmod 0644 "$prefix/$libdir/`basename $i`" || exit 1
    4553        fi
    4654    done
     
    6977for i in $h; do
    7078    appdir=`dirname "$i"`
     79    app=`basename "$i"`
    7180    mkdir -p "$prefix/$appdir" || exit 1
    7281    if [ "$scriptwrapper" = "y" ]; then
     
    7988        fi
    8089        echo "  $prefix/$i"
     90    elif [ "$binaries" = "y" ]; then
     91        # Copy the binary over rather
     92        if [ -e $sharedlib_dir/$app ]; then
     93            if [ "$noclobber" = "0" ] || [ ! -e "$prefix/$i" ]; then
     94                echo "   Copying $sharedlib_dir/$app to $prefix/$i"
     95                cp -pPR $sharedlib_dir/$app $prefix/$i || exit 1
     96            else
     97                echo "  $prefix/$i already exists"
     98            fi
     99        else
     100            echo "Error: Could not find $sharedlib_dir/$app"
     101            exit 1
     102        fi
    81103    else
    82104        if [ "$2" = "--hardlinks" ]; then
Note: See TracChangeset for help on using the changeset viewer.