diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2020-11-28 21:34:46 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2020-11-28 21:34:46 +0000 |
commit | f7a6def99a3d14dbc0a1b0af407306701fe236e1 (patch) | |
tree | 5bf2b577613e3ad81be88fb7aee577434d88be67 /functions.sh.in | |
parent | 9f703d3222a6a8d52ac560035fb1a988d2f9bff7 (diff) | |
parent | bea4965bb14fc4d1a44432e107205472a65e74d2 (diff) | |
download | abuild-f7a6def99a3d14dbc0a1b0af407306701fe236e1.tar.gz abuild-f7a6def99a3d14dbc0a1b0af407306701fe236e1.tar.bz2 abuild-f7a6def99a3d14dbc0a1b0af407306701fe236e1.tar.xz abuild-f7a6def99a3d14dbc0a1b0af407306701fe236e1.zip |
Merge branch 'apkfoundry' into 'master'3.4.2
Add interposition fixes for use with APK Foundry
See merge request adelie/abuild!5
Diffstat (limited to 'functions.sh.in')
-rw-r--r-- | functions.sh.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/functions.sh.in b/functions.sh.in index 557f9a8..1295ee2 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -65,7 +65,7 @@ hostspec_to_libc() { readconfig() { local _APORTSDIR _BUILDDIR _PKGDEST _SRCPKGDEST _REPODEST _SRCDEST local _CARCH _CHOST _CTARGET _CPPFLAGS _CFLAGS _CXXFLAGS _LDFLAGS - local _JOBS _MAKEFLAGS _PACKAGER _USE_COLORS + local _JOBS _MAKEFLAGS _PACKAGER _USE_COLORS _ABUILD_GIT local gitbase= [ -n "${APORTSDIR+x}" ] && _APORTSDIR=$APORTSDIR [ -n "${BUILDDIR+x}" ] && _BUILDDIR=$BUILDDIR @@ -84,20 +84,25 @@ readconfig() { [ -n "${MAKEFLAGS+x}" ] && _MAKEFLAGS=$MAKEFLAGS [ -n "${PACKAGER+x}" ] && _PACKAGER=$PACKAGER [ -n "${USE_COLORS+x}" ] && _USE_COLORS="$USE_COLORS" + [ -n "${ABUILD_GIT+x}" ] && _ABUILD_GIT=$ABUILD_GIT : ${ABUILD_CONF:=$sysconfdir/abuild.conf} : ${ABUILD_USERDIR:=$HOME/.abuild} : ${ABUILD_USERCONF:=$ABUILD_USERDIR/abuild.conf} [ -f "$ABUILD_CONF" ] && . "$ABUILD_CONF" [ -f "$ABUILD_USERCONF" ] && . "$ABUILD_USERCONF" + ABUILD_GIT=${_ABUILD_GIT-$ABUILD_GIT} + if [ -z "$ABUILD_GIT" ]; then + ABUILD_GIT=$(command -v git) || ABUILD_GIT=true + fi APORTSDIR=${_APORTSDIR-$APORTSDIR} - gitbase=$(git rev-parse --show-toplevel 2>/dev/null) || true # already is -P + gitbase=$($ABUILD_GIT rev-parse --show-toplevel 2>/dev/null) || true # already is -P if [ -d "$APORTSDIR" ]; then APORTSDIR=$(cd "$APORTSDIR"; pwd -P) elif [ -z "$APORTSDIR" ] && [ -d "$HOME/aports" ]; then APORTSDIR=$(cd "$HOME/aports"; pwd -P) else if [ -n "$gitbase" ]; then - case $(git config remote.origin.url) in + case $($ABUILD_GIT config remote.origin.url) in */aports) APORTSDIR=$gitbase ;; *) APORTSDIR= ;; esac |