mkarchroot: add -M switch for a custom makepkg.conf

Signed-off-by: Jason Chu <jchu@xentac.net>
This commit is contained in:
Armin Luntzer 2007-11-22 19:50:16 +01:00 committed by Jason Chu
parent 06a0d18bdc
commit 9e660ee86e
1 changed files with 9 additions and 1 deletions

View File

@ -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