From 0049e3d4391844e75764ce8f29bac9e6f6cbf909 Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 2 Jan 2015 18:42:56 +0100 Subject: [PATCH] add arg to use build locales --- bin/buildpkg.in | 2 +- bin/mkchroot.in | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/buildpkg.in b/bin/buildpkg.in index 1556be9..5990c75 100644 --- a/bin/buildpkg.in +++ b/bin/buildpkg.in @@ -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}) diff --git a/bin/mkchroot.in b/bin/mkchroot.in index cbabce8..eba59bc 100644 --- a/bin/mkchroot.in +++ b/bin/mkchroot.in @@ -24,19 +24,20 @@ usage() { echo ' -M Location of a makepkg config file' echo ' -S Location of a pacman-mirrors config file' echo ' -c 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 \