add arg to use build locales

This commit is contained in:
udeved 2015-01-02 18:42:56 +01:00
parent 23886abe14
commit 0049e3d439
2 changed files with 5 additions and 4 deletions

View file

@ -171,7 +171,7 @@ pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
makepkg_conf="${PKGDATADIR}/makepkg-${arch}.conf"
mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf"
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf})
mkchroot_args+=(-L -C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf})
mkchrootpkg_args+=(-r ${chrootdir})

View file

@ -24,19 +24,20 @@ usage() {
echo ' -M <file> Location of a makepkg config file'
echo ' -S <file> Location of a pacman-mirrors config file'
echo ' -c <dir> Set pacman cache'
echo ' -L Use build locale.gen en/de'
echo ' -h This message'
exit 1
}
orig_argv=("$@")
while getopts 'hbC:M:S:c:' arg; do
while getopts 'hLC:M:S:c:' arg; do
case "$arg" in
C) pac_conf="$OPTARG" ;;
M) makepkg_conf="$OPTARG" ;;
S) mirrors_conf="$OPTARG" ;;
c) cache_dir="$OPTARG" ;;
b) build_locales=true ;;
L) build_locales=true ;;
h|?) usage ;;
*) error "invalid argument '$arg'"; usage ;;
esac
@ -79,7 +80,7 @@ basestrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
${build_locales} && printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
echo 'LANG=C' > "$working_dir/etc/locale.conf"
${build_locales} && echo 'LANG=C' > "$working_dir/etc/locale.conf"
echo "$version" > "$working_dir/.manjaro-tools"
exec chroot-run \