#!/bin/sh # preserve only some variables (like LANG) for some crappy tools. unset $(printenv | grep -v '^\$' | egrep -v '^(HOME|LOGNAME|PATH|SHELL|TERM|USER|LANG)=' | sed -r 's/^([^=]+)=.*$/\1/' | xargs) BASENAME="$(basename "${0}")" case "${BASENAME}" in npm|bower) export HOME=${HOME}/tmp ;; esac schroot -c "$(schroot -l | tail -n 1)" -- "${BASENAME}" "${@}"