Dll downloading (again)

Tommy McCabe rocketjet314 at yahoo.com
Sun Nov 2 18:38:19 CST 2003


Good point. Efficiency is important, and my previous
script had a lot of unnecessary repeating. I've
rewritten it to be shorter and sweeter (and not have 6
if-thens in a row!)

#!/bin/bash
# Script for DLL downloading
if [ "$compress" <> 'tar' ] and if [ "$compress" <>
'tar.gzip' ] and if [ "$compress" <> 'zip' ] and if [
"$compress" <> 'none' ] and if [ "$compress" <>
'tar.bzip2' ]
then {
   echo "Compression format not supported. Exiting."
   exit 3
}
if [ "$compress" == 'none' ]
then {
   $compress = 'dll'
}
wget -P /var/tmp
"$server"/"$serverpath"/"$dllname"."$compress"
if [ "$compress" == 'tar.gz' ]
then {
   gzip -d /var/tmp/"$dllname".tar.gz
   rm /var/tmp/"$dllname".tar.gz
}
if [ "$compress" == 'tar.bz2' ]
then {
   bzip2 -d /var/tmp/"$dllname".tar.bz2
   rm /var/tmp/"$dllname".tar.bz2
}
if [ "$compress" <> 'zip' ] and if [ "$compress" <>
'dll' ]
then {
   tar -x -k -f /var/tmp/"$dllname".tar
   rm /var/tmp/"$dllname".tar
}
if [ "$compress" == 'zip' ]
then {
   unzip -n /var/tmp/"$dllname".zip -d /var/tmp
   rm /var/tmp/"$dllname".zip
}
cp /var/tmp/"$dllname".dll "$dest"/"$dllname".dll
exit 0

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dllscript2
Type: application/x-shellscript
Size: 940 bytes
Desc: dllscript2
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20031102/273cf870/dllscript2.bin


More information about the wine-devel mailing list