Better git integration.

This commit is contained in:
Antonin Décimo
2014-07-21 01:19:21 +02:00
parent 3e4e505e8a
commit de4f6ef4c9

View File

@@ -755,11 +755,23 @@ if [ "$RELEASE_APK" = true ]; then
LOVE_ANDROID_DIR="$CACHE_DIR"/love-android-sdl2 LOVE_ANDROID_DIR="$CACHE_DIR"/love-android-sdl2
if [ -d "$LOVE_ANDROID_DIR" ]; then if [ -d "$LOVE_ANDROID_DIR" ]; then
cd "$LOVE_ANDROID_DIR" cd "$LOVE_ANDROID_DIR"
git checkout git checkout -- .
git pull LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
BASE=$(git merge-base @ @{u})
if [ $LOCAL = $REMOTE ]; then
:
elif [ $LOCAL = $BASE ]; then
git pull
ndk-build --jobs $(( $(nproc) + 1))
fi
cd "$RELEASE_DIR" cd "$RELEASE_DIR"
else else
git clone https://bitbucket.org/MartinFelis/love-android-sdl2.git "$CACHE_DIR"/love-android-sdl2 cd "$CACHE_DIR"
git clone https://bitbucket.org/MartinFelis/love-android-sdl2.git
cd "$LOVE_ANDROID_DIR"
ndk-build --jobs $(( $(nproc) + 1))
cd "$RELEASE_DIR"
fi fi
mkdir -p "$LOVE_ANDROID_DIR"/assets mkdir -p "$LOVE_ANDROID_DIR"/assets