sudo mkdir -p ${chr}/etc/profile.d ${chr}/etc/portage/package.{mask,unmask,use,keywords}
(
cat ~/.profile.d/PS1.sh
-sed -e '1{/PS1=/d}' ${chr}/etc/profile.d/chromiumos-niceties.sh
+sed -e '1{/PS1=/d}' ${chr}/etc/profile.d/chromiumos-niceties.sh 2>/dev/null || \
+ echo 'PS1="(cr) ${PS1}"'
) > ${chome}/.ps1.sh
sudo sh -c 'echo export LANG=en_US.UTF8 > '"${chr}/etc/profile.d/LANG.sh"
sudo sh -c "cat > '${chr}/etc/make.conf.user'" <<-\EOF
[[ -x ${chr}/usr/bin/tree ]] || pkgs+=( app-text/tree )
[[ -L ${chr}/usr/bin/esearch ]] || pkgs+=( esearch )
[[ -x ${chr}/usr/bin/strace ]] || pkgs+=( strace )
-[[ -x ${chr}/usr/bin/time ]] || pkgs+=( time )
+[[ -x ${chr}/usr/bin/time ]] || pkgs+=( sys-process/time )
[[ -x ${chr}/usr/bin/gdb ]] || pkgs+=( sys-devel/gdb )
[[ -x ${chr}/usr/bin/diffstat ]] || pkgs+=( diffstat )
[[ ${#pkgs[@]} -eq 0 ]] || cros_sdk -- sudo emerge -1q --jobs ${ncpus} ${pkgs[@]}