diff --git a/create_linux_installer.sh b/create_linux_installer.sh index 29958882..86139106 100755 --- a/create_linux_installer.sh +++ b/create_linux_installer.sh @@ -9,14 +9,7 @@ cd .. python3 build/replace_versions.py ./switch_build.sh client - -if [ ! -e cryptoplugin/cryptopp563.zip ] -then - wget https://www.cryptopp.com/cryptopp563.zip -O cryptoplugin/cryptopp563.zip - cd cryptoplugin - unzip cryptopp563.zip - cd .. -fi +./download_cryptopp.sh autoreconf --install diff --git a/download_cryptopp.sh b/download_cryptopp.sh index 3a85ef81..453b1f8a 100755 --- a/download_cryptopp.sh +++ b/download_cryptopp.sh @@ -5,13 +5,27 @@ set -e CRYPTOPP_NAME="cryptopp565.zip" EXPECTED_SHA256="a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34" +DOWNLOAD_CRYPTOPP=1 cd cryptoplugin -wget http://buildserver.urbackup.org/$CRYPTOPP_NAME -O $CRYPTOPP_NAME -SHASUM=`sha256sum $CRYPTOPP_NAME | cut -d" " -f1` -if [ $SHASUM != $EXPECTED_SHA256 ] +if [ -e $CRYPTOPP_NAME ] then - echo "SHASUM of $CRYPTOPP_NAME is wrong: got $SHASUM expected $EXPECTED_SHA256" - exit 1 + SHASUM=`sha256sum $CRYPTOPP_NAME | cut -d" " -f1` + if [ $SHASUM = $EXPECTED_SHA256 ] + then + DOWNLOAD_CRYPTOPP=0 + fi fi -unzip $CRYPTOPP_NAME + +if [ $DOWNLOAD_CRYPTOPP = 1 ] +then + wget http://buildserver.urbackup.org/$CRYPTOPP_NAME -O $CRYPTOPP_NAME + SHASUM=`sha256sum $CRYPTOPP_NAME | cut -d" " -f1` + if [ $SHASUM != $EXPECTED_SHA256 ] + then + echo "SHASUM of $CRYPTOPP_NAME is wrong: got $SHASUM expected $EXPECTED_SHA256" + exit 1 + fi + unzip $CRYPTOPP_NAME +fi + cd ..