#!/bin/bash
set -ex
-cd ~/chromiumos
+cd ${1:-~/chromiumos}
chr=${PWD}/chroot
chome=${chr}/home/vapier
sed \
sed -e '1{/PS1=/d}' ${chr}/etc/profile.d/chromiumos-niceties.sh
) > ${chome}/.ps1.sh
sudo sh -c "echo export LANG=en_US.UTF8 > ${chr}/etc/profile.d/LANG.sh"
+sudo sh -c "echo FEATURES=noauto > ${chr}/etc/make.conf.user"
sudo sh -c "echo -g > ${chr}/etc/ps1_append"
sudo mv ${chome}/.ps1.sh ${chr}/etc/profile.d/chromiumos-niceties.sh
for f in .nanorc .gdbinit .gitconfig ; do
[[ -x ${chr}/usr/bin/tree ]] || pkgs+=( app-text/tree )
[[ -L ${chr}/usr/bin/esearch ]] || pkgs+=( esearch )
[[ -x ${chr}/usr/bin/strace ]] || pkgs+=( strace )
-[[ ${#pkgs[@]} -eq 0 ]] || cros-sdk -- sudo emerge -1u ${pkgs[@]}
+[[ ${#pkgs[@]} -eq 0 ]] || cros-sdk -- sudo emerge -1 ${pkgs[@]}
sudo sed -i -e '/^# inc/s:^# *::' ${chr}/etc/nanorc