Commit 2c4647b9 authored by Maren Hachmann's avatar Maren Hachmann

Update make_inkscape for using separate build directories per branch

parent f724f580
......@@ -41,6 +41,7 @@ DATE=$(date +%Y.%m.%d.%H.%M.%S)
MARKER="-->"
# Do we want to do a full rebuild? This also allows to build Inkscape if the branch has not changed.
FORCE=0
# Get into correct directory
......@@ -80,7 +81,7 @@ echo "$MARKER Branch $BRANCH selected."
# git submodule deinit --all
# yeah...this is what git suggests to get rid of the submodule:
rm -r -f share/extensions
rm -rf share/extensions
# cleanup, so there won't be anything to commit, causing git to refuse switching branches
git checkout -- .
......@@ -98,7 +99,7 @@ REVISION=$(git log -1 --format="%h")
INSTALL_DIR=$INSTALL_TO/inkscape_$BRANCH
if [ ! -f "$INSTALL_DIR/bin/inkscape" ] || [ ! -f "$SOURCE_DIR/build/bin/inkscape" ] || [ ! "$REVISION" == "$REVISION_OLD" ] || [ $FORCE = 1 ]; then
if [ ! -f "$INSTALL_DIR/bin/inkscape" ] || [ ! -f "$SOURCE_DIR/build_$BRANCH/bin/inkscape" ] || [ ! "$REVISION" == "$REVISION_OLD" ] || [ $FORCE = 1 ]; then
echo "$MARKER Update in progress..."
else
echo "$MARKER No update needed! Your installation is already up-to-date."
......@@ -109,11 +110,15 @@ fi
REMOTE=$(git remote get-url origin)
# Delete any previous builds, if they exist
echo "$MARKER Removing old build directory..."
rm -rf build
mkdir build
cd build
# remove build directory if we want to force a full rebuild
if $FORCE
# Delete any previous builds, if they exist
echo "$MARKER Removing old build directory (build_$BRANCH) ..."
rm -rf build_$BRANCH
fi
mkdir -p build_$BRANCH
cd build_$BRANCH
# Build
echo "$MARKER Configuring and compiling..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment