11 lines
222 B
Bash
Executable file
11 lines
222 B
Bash
Executable file
#!/bin/bash
|
|
export scratch=$(mktemp -p /dev/shm -d -t tmp.XXXXXXXXXX)
|
|
|
|
function finish {
|
|
rm -rf "$scratch"
|
|
}
|
|
|
|
trap finish EXIT
|
|
trap finish SIGTERM
|
|
|
|
bash --init-file <(echo "source ~/.bashrc; pushd $scratch > /dev/null")
|