Skip to content

Instantly share code, notes, and snippets.

@paradigm
Created January 1, 2018 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paradigm/c6025c488b8147d673372dff9b633e0c to your computer and use it in GitHub Desktop.
Save paradigm/c6025c488b8147d673372dff9b633e0c to your computer and use it in GitHub Desktop.
prepare_target() {
notice "Setting up ebuild"
chroot "$target_dir" emerge-webrsync
mkdir -p "$target_dir/etc/portage/repos.conf"
cp "$target_dir/usr/share/portage/config/repos.conf" "$target_dir/etc/portage/repos.conf/gentoo.conf"
notice "Setting up locale"
if [ -n "$LANG" ] && [ "$LANG" != "C" ]
then
echo "### Added by Bedrock Linux when acquiring this stratum" >> "$target_dir/etc/locale.gen"
echo "$LANG UTF-8" >> "$target_dir/etc/locale.gen"
LANG=C chroot "$target_dir" locale-gen
else
warn "Could not determine desired locale, skipping setting locale"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment