Further shaping of compile call script - regarding updating.

This commit is contained in:
Igor Pecovnik 2016-03-20 08:06:47 +01:00
parent 8576154563
commit 2700588bde

View File

@ -77,11 +77,14 @@ apt-get -qq -y --no-install-recommends install git
if [[ ! -d $SRC/lib ]]; then
git clone https://github.com/igorpecovnik/lib
fi
cd $SRC/lib; git pull >/dev/null 2>&1
CHANGED_FILES=$(git checkout | grep -P '^M')
cd $SRC/lib;
echo -e "[\e[0;32m o.k. \x1B[0m] This script will try to update"
git pull
CHANGED_FILES=$(git checkout ${LIB_TAG:- master} | grep -P '^M')
if [[ -n $CHANGED_FILES ]]; then
CHANGED_FILES=$(git checkout ${LIB_TAG:- master} | grep -P '^M' | awk '{print $2}' | tr '\n' ' ')
echo -e "[\e[0;35m warn \x1B[0m] Can't update [lib/] since you made changes to: [\e[0;33m ${CHANGED_FILES::-1} \x1B[0m]"
read -p "Press <Ctrl-C> to abort compilation, <Enter> to ignore and continue"
fi
#--------------------------------------------------------------------------------------------------------------------------------
# Do we need to build all images
@ -94,4 +97,4 @@ fi
# If you are committing new version of this file, increment VERSION
# Only integers are supported
# VERSION=12
# VERSION=13