summaryrefslogtreecommitdiffstats
path: root/mkarchroot
diff options
context:
space:
mode:
authorDaniel Isenmann <daniel@archlinux.org>2007-11-02 01:36:11 +0100
committerJason Chu <jchu@xentac.net>2007-11-03 17:40:18 +0100
commit7bb2c48c8f30a49ea37312ce8c03afe8a6ada073 (patch)
tree53fd1849b234967dbde0581952b1dffa7ffe1fc8 /mkarchroot
parent376e23156bc4092b4cd1de008fd1bca4aecf8edc (diff)
downloaddevtools-7bb2c48c8f30a49ea37312ce8c03afe8a6ada073.tar.gz
devtools-7bb2c48c8f30a49ea37312ce8c03afe8a6ada073.tar.xz
add -C option to mkarchroot
Signed-off-by: Jason Chu <jchu@xentac.net>
Diffstat (limited to 'mkarchroot')
-rwxr-xr-xmkarchroot7
1 files changed, 6 insertions, 1 deletions
diff --git a/mkarchroot b/mkarchroot
index d735cf0..7434453 100755
--- a/mkarchroot
+++ b/mkarchroot
@@ -23,15 +23,17 @@ usage ()
echo " -r <app> Run 'app' within the context of the chroot"
echo " -u Update the chroot via pacman"
echo " -f Force overwrite of files in the working-dir"
+ echo " -C <file> location of a pacman config file"
echo " -h This message"
exit $1
}
-while getopts 'r:ufh' arg; do
+while getopts 'r:ufhC:' arg; do
case "${arg}" in
r) RUN="$OPTARG" ;;
u) RUN="pacman -Syu" ;;
f) FORCE="y" ;;
+ C) pac_conf="$OPTARG" ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@@ -121,6 +123,9 @@ else
# pacman takes these as relative to the given root
pacargs="$pacargs --dbpath=/var/lib/pacman"
pacargs="$pacargs --cachedir=/var/cache/pacman/pkg"
+ if [ "$pac_conf" != "" ]; then
+ pacargs="$pacargs --config=${pac_conf}"
+ fi
if [ $# -eq 0 ]; then
echo "no packages to install"