2018-11-06 13:36:31 +00:00
|
|
|
#!/bin/bash
|
2019-09-12 12:31:27 +00:00
|
|
|
export scratch=$(mktemp -p /dev/shm -d -t tmp.XXXXXXXXXX)
|
2018-11-06 13:36:31 +00:00
|
|
|
function finish {
|
|
|
|
echo "Deleting $scratch..."
|
|
|
|
rm -rf "$scratch"
|
|
|
|
}
|
|
|
|
trap finish EXIT
|
|
|
|
trap finish TERM
|
2018-11-29 07:54:00 +00:00
|
|
|
exec bash --init-file <(echo "source ~/.bashrc; pushd $scratch > /dev/null")
|