Commit 7bba3463 authored by Maren Hachmann's avatar Maren Hachmann

Add build directory variable

parent 7349d9fb
......@@ -14,6 +14,11 @@ DOCUMENTS_DIR=$(xdg-user-dir DOCUMENTS)
# files for the Inkscape source code and the .git directory in it:
SOURCE_DIR="$DOCUMENTS_DIR/inkscape"
# Path to directory that will hold one build folder for each branch.
# The build folder is where the compiled code is stored until it is
# packaged for installation.
BUILDS_DIR="$DOCUMENTS_DIR/inkscape_builds"
# Directory where the builds shall be installed to (it is suggested to leave this unchanged):
INSTALL_TO="/opt"
......
......@@ -99,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_$BRANCH/bin/inkscape" ] || [ ! "$REVISION" == "$REVISION_OLD" ] || [ $FORCE = 1 ]; then
if [ ! -f "$INSTALL_DIR/bin/inkscape" ] || [ ! -f "$BUILDS_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."
......@@ -115,15 +115,15 @@ if [ $FORCE = 1 ]
then
# Delete any previous builds, if they exist
echo "$MARKER Removing old build directory (build_$BRANCH) ..."
rm -rf build_$BRANCH
rm -rf $BUILDS_DIR/build_$BRANCH
fi
mkdir -p build_$BRANCH
cd build_$BRANCH
mkdir -p $BUILDS_DIR/build_$BRANCH
cd $BUILDS_DIR/build_$BRANCH
# Build
echo "$MARKER Configuring and compiling..."
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ..
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $SOURCE_DIR
make -j3
# Create description file
......
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