2013-05-10 21:38:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
VERSION="7"
|
|
|
|
UPDATE="21"
|
|
|
|
BUILD="11"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEMPDIR=$( mktemp -d )
|
2013-05-23 19:14:54 +02:00
|
|
|
USERNAME=$( whoami )
|
2013-05-10 21:38:39 +02:00
|
|
|
|
|
|
|
pushd $TEMPDIR
|
|
|
|
wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=76860 -O jre-${VERSION}u${UPDATE}-windows-i586.exe
|
|
|
|
wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=76862 -O jre-${VERSION}u${UPDATE}-windows-x64.exe
|
|
|
|
mkdir JRE
|
|
|
|
|
|
|
|
WINEPREFIX=$TEMPDIR/prefix32 WINEARCH=win32 wine jre-${VERSION}u${UPDATE}-windows-i586.exe &
|
2013-05-23 19:14:54 +02:00
|
|
|
|
|
|
|
while : ; do
|
|
|
|
[[ -f "$TEMPDIR/prefix32/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}/Data1.cab" ]] && break
|
|
|
|
echo "Pausing until file exists."
|
|
|
|
sleep 1
|
2013-05-10 21:38:39 +02:00
|
|
|
done
|
|
|
|
pushd JRE
|
|
|
|
mkdir X86
|
2013-05-23 19:14:54 +02:00
|
|
|
cp -v "$TEMPDIR/prefix32/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}/*" "X86"
|
2013-05-10 21:38:39 +02:00
|
|
|
popd
|
|
|
|
killall wine
|
|
|
|
|
|
|
|
WINEPREFIX=$TEMPDIR/prefix64 WINEARCH=win64 wine jre-${VERSION}u${UPDATE}-windows-x64.exe &
|
2013-05-23 19:14:54 +02:00
|
|
|
while : ; do
|
|
|
|
[[ -f "$TEMPDIR/prefix64/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}_x64/Data1.cab" ]] && break
|
|
|
|
echo "Pausing until file exists."
|
|
|
|
sleep 1
|
2013-05-10 21:38:39 +02:00
|
|
|
done
|
|
|
|
pushd JRE
|
|
|
|
mkdir X64
|
2013-05-23 19:14:54 +02:00
|
|
|
cp -v "$TEMPDIR/prefix64/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}_x64/*" "X64"
|
2013-05-10 21:38:39 +02:00
|
|
|
popd
|
|
|
|
killall wine
|