Heres a diff to add support to allow a distfile to be checked with a md5,
and to unzip/unrar as the case may be.
The unrar is necessary for programs such as nero, and the unzip necessary
for the gimp2.
--- prepare.orig Tue Aug 24 11:26:19 2004
+++ prepare Tue Aug 24 10:36:31 2004
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Change to the scripts directory so paths are correct
cd ..
@@ -23,3 +23,33 @@
fi
fi
done
+
+# look for MD5|LANG in scripts/ + second arg
+for needed in `egrep -hri "MD5\|($WINLANG|ALL)" scripts/$2 | tr ' ' '~'`; do
+ file=`echo "$needed" | cut -d\| -f3 | perl -pe 's/\r//;s/^ *//;s/ *$//'`
+ corrmd5=`echo "$needed" | cut -d\| -f4 | perl -pe 's/\r//;s/^ *//;s/ *$//'`
+ filemd5=`cat $file | md5`
+ if [ X"$corrmd5" != X"$filemd5" ]; then
+ echo $file has an incorrect md5. aborting.
+ exit
+ fi
+done
+
+# look for UNRAR|LANG in scripts/ + second arg
+for needed in `egrep -hri "UNRAR\|($WINLANG|ALL)" scripts/$2 | tr ' ' '~'`; do
+ file=`echo "$needed" | cut -d\| -f3 | perl -pe 's/\r//;s/^ *//;s/ *$//'`
+ path=`echo "$file" | sed "s/\(.*\)\/[^\/]*/\1/"`
+ if [ ! -f $file.unrar_completed ]; then
+ unrar x $file $path && touch $file.unrar_completed
+ fi
+done
+
+# look for UNZIP|LANG in scripts/ + second arg
+for needed in `egrep -hri "UNZIP\|($WINLANG|ALL)" scripts/$2 | tr ' ' '~'`; do
+ file=`echo "$needed" | cut -d\| -f3 | perl -pe 's/\r//;s/^ *//;s/ *$//'`
+ path=`echo "$file" | sed "s/\(.*\)\/[^\/]*/\1/"`
+ if [ ! -f $file.unzip_completed ]; then
+ unzip $file -d $path && touch $file.unzip_completed
+ fi
+done
+
--nero.bat
:: Nero Burning ROM
:: URL|ALL|ftp://ftp4.nero.com/nero551056.exe|packages/nero/nero551056.exe
:: UNRAR|ALL|packages/nero/nero551056.exe
:: MD5|ALL|packages/nero/nero551056.exe|6e8aec504510caccf5919c8f2afc7f5c
@Echo off
todo.pl "%Z%\packages\nero\setup.exe /silent /noreboot"
todo.pl "%SystemRoot%\regedit.exe /s %Z%\scripts\nero.reg"
--nero.reg is just
[HKEY_LOCAL_MACHINE\SOFTWARE\Ahead\Nero - Burning Rom\Info]
exported from after an install. So far it's the only way
I've found to give it a registration key.
--gimp.bat
:: GIMP 2.0
:: See http://www2.arnes.si/~sopjsimo/gimp/stable.html
:: You must extract the downloaded zip files in the packages/gimp directory.
::
URL|ALL|ftp://ftp.arnes.si/software/gimp-win/gimp-2.0.1-i586-setup-1.zip|packages/gimp/gimp-2.0.1-i586-setup-1.zip
::
URL|ALL|ftp://ftp.arnes.si/software/gimp-win/gtk+-2.2.4-20040124-setup.zip|packages/gimp/gtk+-2.2.4-20040124-setup.zip
::
URL|ALL|ftp://ftp.arnes.si/software/gimp-win/gimp-help-2-0.2-setup.zip|packages/gimp/gimp-help-2-0.2-setup.zip
::
URL|ALL|ftp://ftp.arnes.si/software/gimp-win/gimp-gap-2.0.0-setup-1.zip|packages/gimp/gimp-gap-2.0.0-setup-1.zip
:: MD5|ALL|packages/gimp/gimp-2.0.1-i586-setup-1.zip|cfd4c7eecb975dfaeafd2e14dbb9155b
:: MD5|ALL|packages/gimp/gimp-gap-2.0.0-setup-1.zip|7f6fbc3b520f4573dab6183d605fadc2
:: MD5|ALL|packages/gimp/gimp-help-2-0.2-setup.zip|be449c98df8b9159adda1b378db946f8
:: MD5|ALL|packages/gimp/gtk+-2.2.4-20040124-setup.zip|0922f5a5244a0c05bceccfa0c839a85c
:: UNZIP|ALL|packages/gimp/gimp-2.0.1-i586-setup-1.zip
:: UNZIP|ALL|packages/gimp/gtk+-2.2.4-20040124-setup.zip
:: UNZIP|ALL|packages/gimp/gimp-help-2-0.2-setup.zip
:: UNZIP|ALL|packages/gimp/gimp-gap-2.0.0-setup-1.zip
:: OPTIONAL: Install the GIMP
todo.pl "%Z%\packages\gimp\gimp-help-2-setup.exe SP- /SILENT /NORESTART"
todo.pl "%Z%\packages\gimp\gimp-gap-2.0.0-setup.exe SP- /SILENT /NORESTART"
todo.pl "%Z%\packages\gimp\gtk+-2.2.4-20040124-setup.exe.exe SP- /SILENT /NORESTART"
todo.pl "%Z%\packages\gimp\gimp-2.0.1-setup.exe SP- /SILENT /NORESTART"
--
"Most moms teach their daughters how to run a house, but you? You teach
yours the fine art of mass destruction."
- Nabs - Goodbye is not forever
perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print'
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info