diff options
author | Piraty <piraty1@inbox.ru> | 2020-03-16 13:38:22 +0100 |
---|---|---|
committer | Leah Neukirchen <chneukirchen@gmail.com> | 2020-03-16 23:55:54 +0100 |
commit | 897a80bc4f6abe81385d1ffcaa0003245eec98f6 (patch) | |
tree | fc757d3d2c49f59335061de8224bdffec0bb176a /xgensum | |
parent | ca3cf4f3537c588f6100fd817c3a25a84629ec1c (diff) | |
download | xtools-897a80bc4f6abe81385d1ffcaa0003245eec98f6.tar.gz xtools-897a80bc4f6abe81385d1ffcaa0003245eec98f6.tar.xz xtools-897a80bc4f6abe81385d1ffcaa0003245eec98f6.zip |
xgensum: don't fore hostdir path if -H is omitted
This way, XBPS_HOSTDIR will be used by xbps-src just like XBPS_MASTERDIR. `-H` can still overwrite it. It's kept for compatibility.
Diffstat (limited to 'xgensum')
-rwxr-xr-x | xgensum | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xgensum b/xgensum index 72963c6..448c552 100755 --- a/xgensum +++ b/xgensum @@ -14,13 +14,11 @@ case "$1" in esac case "$1" in - -H*) FLAG_h=$2; shift; shift + -H*) FLAG_h="-H $2"; shift; shift esac XBPS_DISTDIR=$(xdistdir) || exit 1 -: ${FLAG_h:=$XBPS_DISTDIR/hostdir} - if [ -f "$1" ]; then template="$1" elif [ -f "$1/template" ]; then @@ -39,7 +37,7 @@ if [ -f "${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh" ]; t . "${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh" fi -XBPS_SRCDISTDIR=$("$XBPS_DISTDIR/xbps-src" -H $FLAG_h show-var XBPS_SRCDISTDIR | tail -1) +XBPS_SRCDISTDIR=$("$XBPS_DISTDIR/xbps-src" $FLAG_h show-var XBPS_SRCDISTDIR | tail -1) srcdir="$XBPS_SRCDISTDIR/$pkgname-$version" if [ "$FLAG_f" = -f ]; then @@ -49,10 +47,10 @@ if [ "$FLAG_f" = -f ]; then distfile="$srcdir/$curfile" rm -vf "$distfile" done - "$XBPS_DISTDIR/xbps-src" -H $FLAG_h -I clean $pkgname + "$XBPS_DISTDIR/xbps-src" $FLAG_h -I clean $pkgname fi -"$XBPS_DISTDIR/xbps-src" -H $FLAG_h -I fetch $pkgname +"$XBPS_DISTDIR/xbps-src" $FLAG_h -I fetch $pkgname ret=0 sums="" |