From 403ea33e34883fb2d18ee026aabd0eb8e74169bc Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Thu, 16 Dec 2004 09:49:14 +0000 Subject: INTEGRATION: CWS nativefixer2 (1.1.2); FILE ADDED 2004/12/09 17:13:17 is 1.1.2.1: #118708# optimizing process --- setup_native/scripts/downloadscript.sh | 85 ++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 setup_native/scripts/downloadscript.sh (limited to 'setup_native/scripts') diff --git a/setup_native/scripts/downloadscript.sh b/setup_native/scripts/downloadscript.sh new file mode 100644 index 000000000000..d86e8a884cff --- /dev/null +++ b/setup_native/scripts/downloadscript.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +linenum=LINENUMBERPLACEHOLDER + +UNPACKDIR=/var/tmp/unpack_PRODUCTNAMEPLACEHOLDER + +# Asking for the unpack directory + +echo +echo "Where do you want to unpack the PRODUCTNAMEPLACEHOLDER download set ? [$UNPACKDIR] " +read reply leftover +if [ "x$reply" != "x" ] +then + UNPACKDIR="$reply" +fi + +# Unpacking + +mkdir $UNPACKDIR + +#diskSpace=`df -k $outdir | tail -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'` +#if [ $diskSpace -lt $diskSpaceRequired ]; then +# printf "You will need atleast %s kBytes of Disk Free\n" $diskSpaceRequired +# printf "Please free up the required Disk Space and try again\n" +# exit 3 +#fi + +trap 'rm -rf $UNPACKDIR; exit 1' HUP INT QUIT TERM +echo "Unpacking ..." + +#if [ -x /usr/bin/sum ] ; then +# echo "Checksumming..." +# +# sum=`/usr/bin/sum $outdir/$outname` +# index=1 +# for s in $sum +# do +# case $index in +# 1) sum1=$s; +# index=2; +# ;; +# 2) sum2=$s; +# index=3; +# ;; +# esac +# done +# if expr $sum1 != || expr $sum2 != ; then +# echo "The download file appears to be corrupted. Please refer" +# echo "to the Troubleshooting section of the Installation" +# exit 1 +# fi +#else +# echo "Can't find /usr/bin/sum to do checksum. Continuing anyway." +#fi + +# Determining current platform + +platform=`uname -s` + +case $platform in +SunOS) + tail +$linenum $0 | (cd $UNPACKDIR; tar xvf -) + ;; +Linux) + tail +$linenum $0 | (cd $UNPACKDIR; tar xvf -) + ;; +*) + echo "Unsupported platform" + exit 1 + ;; +esac + +echo "Successfully unpacked..." + +echo "Trying to start setup..." + +if [ -f $UNPACKDIR/setup ] +then + chmod 775 $UNPACKDIR/setup + $UNPACKDIR/setup +fi + +echo "Done" + +exit 0 -- cgit v1.2.3