xbps-src: added -s flag to override default XBPS_SRCDISTDIR value.

This commit is contained in:
Juan RP 2010-10-30 18:25:04 +02:00
parent ade2b03094
commit c5f1097f4e

View file

@ -37,7 +37,7 @@ trap '_MASTERDIR=${XBPS_MASTERDIR} sighandler_exit $?' 0 INT QUIT
sighandler_exit() sighandler_exit()
{ {
# Always unmount in case, we failed before! # Always unmount in case we failed before!
if [ -z "$in_chroot" ]; then if [ -z "$in_chroot" ]; then
env MASTERDIR="${_MASTERDIR}" \ env MASTERDIR="${_MASTERDIR}" \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
@ -65,7 +65,7 @@ check_reqhost_utils()
usage() usage()
{ {
cat << _EOF cat << _EOF
$progname: [-Ch] [-c <config_file>] [-m <masterdir>] [-p <pkgdir>] <target> $progname: [-Ch] [-c <file>] [-m <dir>] [-p <dir>] [-s <dir>] <target>
Targets: Targets:
bootstrap Build and install the bootstrap packages into <masterdir>. bootstrap Build and install the bootstrap packages into <masterdir>.
@ -106,6 +106,8 @@ Options:
file at @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf. file at @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf.
-p Package directory, overwritting default path at -p Package directory, overwritting default path at
<masterdir>/pkg-binpkgs. <masterdir>/pkg-binpkgs.
-s Source distribution files directory, overwritting default path at
<masterdir>/pkg-srcdistdir.
_EOF _EOF
} }
@ -177,7 +179,7 @@ check_config_vars()
# #
# main() # main()
# #
while getopts "Cc:hm:p:" opt; do while getopts "Cc:hm:p:s:" opt; do
case $opt in case $opt in
C) export dontrm_builddir=yes;; C) export dontrm_builddir=yes;;
c) XBPS_CONFIG_FILE="$OPTARG";; c) XBPS_CONFIG_FILE="$OPTARG";;
@ -196,6 +198,7 @@ while getopts "Cc:hm:p:" opt; do
mkdir -p ${_PACKAGEDIR}/noarch mkdir -p ${_PACKAGEDIR}/noarch
fi fi
;; ;;
s) export XBPS_SRCDISTDIR="$OPTARG";;
--) shift; break;; --) shift; break;;
esac esac
done done