From a80fe69f4b56b1ee10d2c57861282571fc89e8e1 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 20 Oct 2008 01:09:43 -0500 Subject: Only run locale-gen if the target root has /etc/locale.gen Signed-off-by: Aaron Griffin --- mkarchroot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mkarchroot') diff --git a/mkarchroot b/mkarchroot index 58065b3..099083d 100755 --- a/mkarchroot +++ b/mkarchroot @@ -171,9 +171,11 @@ else cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf fi - echo "generating default locales" - cp /etc/locale.gen "${working_dir}/etc/locale.gen" - chroot "${working_dir}" locale-gen + if [ -e "${working_dir}/etc/locale.gen" ]; then + echo "generating default locales from host system" + cp /etc/locale.gen "${working_dir}/etc/locale.gen" + chroot "${working_dir}" locale-gen + fi if [ ! -e "${working_dir}/.arch-chroot" ]; then date +%s > "${working_dir}/.arch-chroot" -- cgit v1.2.3-24-g4f1b