xbps-src: print_cross_targets properly without `XBPS_DISTDIR` set
because it is called in `usage()`, before `XBPS_DISTDIR` is set by `xbps-src`, it would only work if `XBPS_DISTDIR` is set by the user.
This commit is contained in:
parent
79cf2d3cab
commit
73c84ad4b5
7
xbps-src
7
xbps-src
|
@ -9,6 +9,13 @@ print_cross_targets() {
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
# copied from main logic because this is run before XBPS_DISTDIR is set normally
|
||||||
|
local _distdir="$(readlink -f "${0%/*}")"
|
||||||
|
if [ "${_distdir}" = "." ]; then
|
||||||
|
readonly XBPS_DISTDIR="$(pwd -P)"
|
||||||
|
else
|
||||||
|
readonly XBPS_DISTDIR="${_distdir}"
|
||||||
|
fi
|
||||||
cat << _EOF
|
cat << _EOF
|
||||||
$PROGNAME: [options] <target> [arguments]
|
$PROGNAME: [options] <target> [arguments]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue