xbps-src: added -p flag to specify pkg directory.
This overwrittes the value set in the configuration file. --HG-- extra : convert_revision : 0d46804055edf3400a20d70d5d2917da3064f9f9
This commit is contained in:
parent
370248f246
commit
4804461547
|
@ -65,6 +65,8 @@ Options:
|
|||
-C Do not remove build directory after successful installation.
|
||||
-c Path to global configuration file:
|
||||
if not specified @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf is used.
|
||||
-p Package directory, overwritting XBPS_PACKAGESDIR in xbps-src.conf.
|
||||
|
||||
_EOF
|
||||
exit 1
|
||||
}
|
||||
|
@ -115,7 +117,8 @@ check_config_vars()
|
|||
msg_error "cannot find configuration file: $XBPS_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
local XBPS_VARS="XBPS_MASTERDIR XBPS_BUILDDIR XBPS_SRCDISTDIR"
|
||||
local XBPS_VARS="XBPS_MASTERDIR XBPS_BUILDDIR XBPS_SRCDISTDIR \
|
||||
XBPS_PACKAGESDIR"
|
||||
for f in ${XBPS_VARS}; do
|
||||
eval val="\$$f"
|
||||
[ -z "$val" ] && msg_error "'$f' not set in configuration file"
|
||||
|
@ -132,10 +135,17 @@ check_config_vars()
|
|||
#
|
||||
# main()
|
||||
#
|
||||
while getopts "Cc:" opt; do
|
||||
while getopts "Cc:p:" opt; do
|
||||
case $opt in
|
||||
C) export dontrm_builddir=yes;;
|
||||
c) config_file_specified=yes; XBPS_CONFIG_FILE="$OPTARG";;
|
||||
p)
|
||||
_PACKAGEDIR="$OPTARG"
|
||||
if [ ! -d ${_PACKAGEDIR} ]; then
|
||||
mkdir -p ${_PACKAGEDIR}/${xbps_machine}
|
||||
mkdir -p ${_PACKAGEDIR}/noarch
|
||||
fi
|
||||
;;
|
||||
--) shift; break;;
|
||||
esac
|
||||
done
|
||||
|
@ -205,6 +215,9 @@ build|configure)
|
|||
build-pkg)
|
||||
. $XBPS_SHUTILSDIR/make-binpkg.sh
|
||||
. $XBPS_SHUTILSDIR/tmpl_funcs.sh
|
||||
if [ -n "${_PACKAGEDIR}" ]; then
|
||||
export XBPS_PACKAGESDIR=${_PACKAGEDIR}
|
||||
fi
|
||||
if [ "$2" = "all" ]; then
|
||||
for f in $($XBPS_BIN_CMD list|awk '{print $1}'); do
|
||||
pkg=$(${XBPS_PKGDB_CMD} getpkgname $f)
|
||||
|
|
Loading…
Reference in New Issue