chroot-wrapper 274 B

123456
  1. #!/bin/sh
  2. # preserve only some variables (like LANG) for some crappy tools.
  3. unset $(printenv | grep -v '^\$' | egrep -v '^(HOME|LOGNAME|PATH|SHELL|TERM|USER|LANG)=' | sed -r 's/^([^=]+)=.*$/\1/' | xargs)
  4. schroot -c "$(schroot -l | head -1)" -- "$(basename "${0}")" "${@}"