Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-12-21 02:24:39 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2008-12-21 02:24:39 -0600
commit978fdafbffc000a5802c9505ae6ec1565b96871d (patch)
tree886cec635a35ae1b3eb01370b3cf09e34f2703d8
parent4c3572f415e6e640154dbcb385ea3f524004d4c9 (diff)
Allow specifying of pacman.conf file in mkarchiso
Use the -C flag to allow us to build alternate isos on a different architecture and things of the sort Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xarchiso/mkarchiso12
1 files changed, 10 insertions, 2 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 9a27cb5..3e54b5b 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -3,6 +3,7 @@
PKGLIST=""
QUIET="y"
FORCE="n"
+PACCONFIG="/etc/pacman.conf"
APPNAME=$(basename "${0}")
@@ -13,6 +14,7 @@ usage ()
echo " general options:"
echo " -f Force overwrite of working files/squashfs image/bootable image"
echo " -p PACKAGE(S) Additional package(s) to install, can be used multiple times"
+ echo " -C <file> Config file for pacman. Default $PACCONFIG"
echo " -v Enable verbose output."
echo " -h This message."
echo " commands:"
@@ -29,6 +31,7 @@ usage ()
while getopts 'i:P:p:a:t:fvh' arg; do
case "${arg}" in
p) PKGLIST="${PKGLIST} ${OPTARG}" ;;
+ C) PACCONFIG="${OPTARG}" ;;
f) FORCE="y" ;;
v) QUIET="n" ;;
h|?) usage 0 ;;
@@ -47,6 +50,11 @@ if [ "$EUID" != "0" ]; then
exit 1
fi
+if [ ! -f "$PACCONFIG" ]; then
+ echo "error: pacman config file '$PACCONFIG' does not exist"
+ exit 1
+fi
+
command_name="${1}"
work_dir=""
imgname=""
@@ -70,10 +78,10 @@ _pacman ()
{
local ret
if [ "${QUIET}" = "y" ]; then
- mkarchroot -f "${work_dir}/root-image" $* 2>&1 >/dev/null
+ mkarchroot -C "$PACCONFIG" -f "${work_dir}/root-image" $* 2>&1 >/dev/null
ret=$?
else
- mkarchroot -f "${work_dir}/root-image" $*
+ mkarchroot -C "$PACCONFIG" -f "${work_dir}/root-image" $*
ret=$?
fi