summaryrefslogtreecommitdiffstats
path: root/source/d/git/git.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/git/git.SlackBuild')
-rwxr-xr-xsource/d/git/git.SlackBuild19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/d/git/git.SlackBuild b/source/d/git/git.SlackBuild
index 3a947c597..b652b50c9 100755
--- a/source/d/git/git.SlackBuild
+++ b/source/d/git/git.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,10 +20,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-BUILD=${BUILD:-1}
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=git
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-3}
+
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
@@ -36,6 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
eval $(perl '-V:installvendorlib')
PERLDIR=$installvendorlib/$ARCH-linux-thread-multi/auto
@@ -58,7 +68,6 @@ else
SLKCFLAGS="-O2"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-git
@@ -68,7 +77,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf git-$VERSION
tar xvf $CWD/git-$VERSION.tar.?z* || exit 1
-cd git-$VERSION
+cd git-$VERSION || exit 1
chown -R root:root .
find . \