Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-04-06 18:38:10 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-04-06 18:38:10 +0200
commit4bcafd9768be4d1fefea2047ea1f34d8904eeb9e (patch)
tree3baa52b155ed259230c9a0f0ed66b6cee30c6d99
parent1f0374d8a612e8ae4cfe1424e586b443ab10aebb (diff)
mkarchroot: code cleanup
-rw-r--r--mkarchroot.in20
1 files changed, 6 insertions, 14 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index 67a79aa..454d789 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -171,23 +171,15 @@ else
pacargs+=("--config=${pac_conf}")
fi
- if (( $# != 0 )); then
- if [[ $FORCE = 'y' ]]; then
- pacargs+=("--force")
- fi
- if ! pacstrap -GMcd "${working_dir}" "${pacargs[@]}" "$@"; then
- die 'Failed to install all packages'
- fi
+ if [[ $FORCE = 'y' ]]; then
+ pacargs+=("--force")
fi
-
- if [[ -d "${working_dir}/lib/modules" ]]; then
- chroot_run "${working_dir}" ldconfig
+ if ! pacstrap -GMcd "${working_dir}" "${pacargs[@]}" "$@"; then
+ die 'Failed to install all packages'
fi
- if [[ -e "${working_dir}/etc/locale.gen" ]]; then
- sed -i 's@^#\(en_US\|de_DE\)\(\.UTF-8\)@\1\2@' "${working_dir}/etc/locale.gen"
- chroot_run "${working_dir}" locale-gen
- fi
+ printf '%s.UTF-8 UTF-8\n' en_US de_DE > "${working_dir}/etc/locale.gen"
+ chroot_run "${working_dir}" locale-gen
echo 'LANG=C' > "${working_dir}/etc/locale.conf"
copy_hostconf