diff --git a/compile.sh b/compile.sh index b51f45a48f..03f38a0827 100644 --- a/compile.sh +++ b/compile.sh @@ -87,3 +87,7 @@ if [ "$BUILD_ALL" == "yes" ]; then else source $SRC/lib/main.sh fi + +# If you are editing this file, increment VERSION +# Only integers are supported +# VERSION=3 diff --git a/main.sh b/main.sh index a9a97328b2..1f62f98d5a 100644 --- a/main.sh +++ b/main.sh @@ -23,6 +23,14 @@ fi done + # compile.sh version checking + ver1=$(grep '^# VERSION' "$SRC/compile.sh" | cut -d'=' -f2) + ver2=$(grep '^# VERSION' "$SRC/lib/compile.sh" | cut -d'=' -f2) + if [ -z "$ver1" ] || [ "$ver1" -lt "$ver2" ]; then + echo -e "[\e[0;35m warn \x1B[0m] File $0 is outdated. Please copy it again, \nchange options if needed and restart compilation process" + read -p "Press to abort compilation, to continue" + fi + # We'll use this tittle on all menus backtitle="Armbian building script, http://www.armbian.com | Author: Igor Pecovnik"