diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-12-16 09:49:14 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-12-16 09:49:14 +0000 |
commit | 403ea33e34883fb2d18ee026aabd0eb8e74169bc (patch) | |
tree | a74e4c2c4cce8b99f6a2db7d5eda8d277b138e3e /setup_native/scripts | |
parent | ca3cf45c3d0c00d8e232f61f0d604766df929930 (diff) |
INTEGRATION: CWS nativefixer2 (1.1.2); FILE ADDED
2004/12/09 17:13:17 is 1.1.2.1: #118708# optimizing process
Diffstat (limited to 'setup_native/scripts')
-rw-r--r-- | setup_native/scripts/downloadscript.sh | 85 |
1 files changed, 85 insertions, 0 deletions
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 != <sum1replace> || expr $sum2 != <sum2replace> ; 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 |