1
0
mirror of https://bitbucket.org/shim_/docker-rtm.git synced 2018-10-04 01:52:08 +02:00

use cached installr

This commit is contained in:
shim_ 2016-06-13 15:49:05 +02:00
parent ccc76bf687
commit 5b1b429f4d

14
init.sh
View File

@ -10,9 +10,7 @@ function report_loop {
done done
} }
if [ -f "$BINARY" ]; then function fetch_installer {
report_loop
else
curl "$RTM_DOWNLOAD_URL$RTM_VERSION" > $INSTALLER curl "$RTM_DOWNLOAD_URL$RTM_VERSION" > $INSTALLER
CHECKSUM=$(sha256sum $INSTALLER) CHECKSUM=$(sha256sum $INSTALLER)
if [ "$CHECKSUM" -eq "$RTM_INSTALLER_CHECKSUM $INSTALLER" ]; then if [ "$CHECKSUM" -eq "$RTM_INSTALLER_CHECKSUM $INSTALLER" ]; then
@ -23,4 +21,14 @@ else
echo Checksum mismatch! echo Checksum mismatch!
exit 1 exit 1
fi fi
}
if [ -f "$BINARY" ]; then
report_loop
else
if [ -f "$INSTALLER" ]; then
$INSTALLER
else
fetch_installer
fi
fi fi