Failsafe: checking version of copied compile.sh
This commit is contained in:
parent
3e83dd5d01
commit
8e21284e3d
@ -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
|
||||
|
||||
8
main.sh
8
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 <Ctrl-C> to abort compilation, <Enter> to continue"
|
||||
fi
|
||||
|
||||
# We'll use this tittle on all menus
|
||||
backtitle="Armbian building script, http://www.armbian.com | Author: Igor Pecovnik"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user