[mkchroot] include some msg; add condition
This commit is contained in:
parent
b2549b0090
commit
3c3c26eec9
1 changed files with 5 additions and 3 deletions
|
@ -86,23 +86,25 @@ if [[ $(stat -f -c %T "$working_dir") == btrfs ]]; then
|
|||
fi
|
||||
|
||||
# Workaround when creating a chroot in a branch different of the host
|
||||
if [[ -n $pac_conf ]] && [[ -n $mirrors_conf ]]; then
|
||||
if [[ -n $pac_conf ]] && [[ -n $mirrors_conf ]] && [[ -n ${build_mirror} ]]; then
|
||||
url=${build_mirror}'/$repo/$arch'
|
||||
msg3 "mirror: $url"
|
||||
pac_base="$working_dir/pacman-basestrap.conf"
|
||||
sed "s#Include = /etc/pacman.d/mirrorlist#Server = ${url}#g" $pac_conf > $pac_base
|
||||
|
||||
basestrap -GMcd ${pac_base:+-C "$pac_base"} "$working_dir" \
|
||||
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
|
||||
|
||||
[[ -f "$pac_base" ]] && rm "$pac_base"
|
||||
else
|
||||
basestrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
||||
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
|
||||
fi
|
||||
|
||||
[[ -f "$pac_base" ]] && rm "$pac_base"
|
||||
|
||||
echo "$version" > "$working_dir/.manjaro-tools"
|
||||
|
||||
if ${build_locales};then
|
||||
msg3 "Using build locales ..."
|
||||
mv "$working_dir/etc/locale.gen" "$working_dir/etc/locale.gen.bak"
|
||||
mv "$working_dir/etc/locale.conf" "$working_dir/etc/locale.conf.bak"
|
||||
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
|
||||
|
|
Loading…
Reference in a new issue