diff options
author | Armin Luntzer <armin@archlinuxppc.org> | 2007-11-22 19:50:16 +0100 |
---|---|---|
committer | Jason Chu <jchu@xentac.net> | 2007-11-27 16:45:28 -0800 |
commit | 9e660ee86e185a42514f11d1f7bab80dc3c1c49c (patch) | |
tree | 2250bae4166df87ed37b3a613b9671bc6d3c0ad9 | |
parent | 06a0d18bdc77528f02d3ed81e42f739617b87ca1 (diff) | |
download | devtools-9e660ee86e185a42514f11d1f7bab80dc3c1c49c.tar.xz |
mkarchroot: add -M switch for a custom makepkg.conf
Signed-off-by: Jason Chu <jchu@xentac.net>
-rwxr-xr-x | mkarchroot | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -24,16 +24,18 @@ usage () 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 " -M <file> location of a makepkg config file" echo " -h This message" exit $1 } -while getopts 'r:ufhC:' arg; do +while getopts 'r:ufhC:M:' arg; do case "${arg}" in r) RUN="$OPTARG" ;; u) RUN="pacman -Syu" ;; f) FORCE="y" ;; C) pac_conf="$OPTARG" ;; + M) makepkg_conf="$OPTARG" ;; h|?) usage 0 ;; *) echo "invalid argument '${arg}'"; usage 1 ;; esac @@ -156,6 +158,12 @@ else cp ${pac_conf} ${working_dir}/etc/pacman.conf fi + if [ "$makepkg_conf" != "" ]; then + echo "installing custom makepkg.conf" + cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf + fi + + echo "generating default locales" sed -i "s|^#\(.*$LANG\)|\1|g" "${working_dir}/etc/locale.gen" chroot "${working_dir}" locale-gen |