--- /dev/null
+#!/bin/bash -e
+
+for cros_dir in "${HOME}/chromiumos" "/usr/local/src/chromiumos" ; do
+ [[ -d ${cros_dir} ]] && break || :
+done
+depot_dir="${cros_dir}/depot_tools"
+cros_sdk="${depot_dir}/cros_sdk"
+
+cd "${cros_dir}"
+rsync -a ~/.bin/cros-* "${depot_dir}"/
+
+exec "${cros_sdk}" "$@"
--- /dev/null
+#!/bin/bash
+set -ex
+cd ~/chromiumos
+chr=${PWD}/chroot
+chome=${chr}/home/vapier
+sed \
+ -e '/^set speller/s:^:#:' \
+ -e '/^unbind/s:^:#:' \
+ ~/.nanorc > ${chome}/.nanorc
+cat ~/.profile.d/aliases.sh > ${chome}/.bashrc
+(
+cat ~/.profile.d/PS1.sh
+sed -e '1{/PS1=/d}' ${chr}/etc/profile.d/chromiumos-niceties.sh
+) > ${chome}/.ps1.sh
+sudo mv ${chome}/.ps1.sh ${chr}/etc/profile.d/chromiumos-niceties.sh
+sudo ln -f ${chome}/.nanorc ${chr}/root/
+
+pkgs=()
+[[ -x ${chr}/bin/nano ]] || pkgs+=( nano )
+[[ -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[@]}
+
+sudo sed -i -e '/^# inc/s:^# *::' ${chr}/etc/nanorc