diff --git a/upgrade.sh b/upgrade.sh index 2501333..fc8f1b6 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # Upgrade script +set -x + if [ $# -eq 0 ] then echo 'Pass new LimeSurvey Version tag:' @@ -20,7 +22,8 @@ fi # Download, unzip and chmod LimeSurvey from official GitHub repository wget -P /tmp "https://github.com/LimeSurvey/LimeSurvey/archive/${NEW_VERSION}.tar.gz" -SHA256_CHECKSUM=$(sha256 "${NEW_VERSION}.tar.gz") + +SHA256_CHECKSUM=$(sha256sum "/tmp/${NEW_VERSION}.tar.gz" | awk '{ print $1 }') # Update lines in the files sed -r -i -e "s/[0-9]+(\.[0-9]+)+\+[0-9]+/$NEW_VERSION/" apache/Dockerfile fpm/Dockerfile fpm-alpine/Dockerfile