sereby.aio/createjrepack.sh
2013-05-23 19:14:54 +02:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
VERSION="7"
UPDATE="21"
BUILD="11"
TEMPDIR=$( mktemp -d )
USERNAME=$( whoami )
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 &
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
done
pushd JRE
mkdir X86
cp -v "$TEMPDIR/prefix32/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}/*" "X86"
popd
killall wine
WINEPREFIX=$TEMPDIR/prefix64 WINEARCH=win64 wine jre-${VERSION}u${UPDATE}-windows-x64.exe &
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
done
pushd JRE
mkdir X64
cp -v "$TEMPDIR/prefix64/drive_c/users/${USERNAME}/Application\ Data/Sun/Java/jre1.${VERSION}.0_${UPDATE}_x64/*" "X64"
popd
killall wine