Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/applets/install.sh
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/applets/install.sh
r3232 r3621 6 6 prefix=$1 7 7 if [ -z "$prefix" ]; then 8 echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/-- scriptwrapper]"8 echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]" 9 9 exit 1 10 10 fi 11 11 12 # Source the configuration 13 . ./.config 14 12 15 h=`sort busybox.links | uniq` 16 17 sharedlib_dir="0_lib" 13 18 14 19 linkopts="" 15 20 scriptwrapper="n" 21 binaries="n" 16 22 cleanup="0" 17 23 noclobber="0" … … 19 25 --hardlinks) linkopts="-f";; 20 26 --symlinks) linkopts="-fs";; 27 --binaries) binaries="y";; 21 28 --scriptwrapper) scriptwrapper="y";swrapall="y";; 22 29 --sw-sh-hard) scriptwrapper="y";linkopts="-f";; … … 41 48 rm -f "$prefix/$libdir/$i" || exit 1 42 49 if [ -f "$i" ]; then 50 echo " Installing $i to the target at $prefix/$libdir/" 43 51 cp -pPR "$i" "$prefix/$libdir/" || exit 1 44 chmod 0644 "$prefix/$libdir/ $i" || exit 152 chmod 0644 "$prefix/$libdir/`basename $i`" || exit 1 45 53 fi 46 54 done … … 69 77 for i in $h; do 70 78 appdir=`dirname "$i"` 79 app=`basename "$i"` 71 80 mkdir -p "$prefix/$appdir" || exit 1 72 81 if [ "$scriptwrapper" = "y" ]; then … … 79 88 fi 80 89 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 81 103 else 82 104 if [ "$2" = "--hardlinks" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.