Update scratch to allow running scripts

When passing any arguments to scratch, they will be executed as a
command in the temporary directory
This commit is contained in:
Talia 2019-09-18 14:47:50 +02:00
parent fee1f0601a
commit 4fef56cdb8

View file

@ -8,4 +8,10 @@ function finish {
trap finish EXIT
trap finish SIGTERM
if [ -z $1 ]
then
bash --init-file <(echo "source ~/.bashrc; pushd $scratch > /dev/null")
else
cd $scratch
"$@"
fi