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:
parent
fee1f0601a
commit
4fef56cdb8
1 changed files with 7 additions and 1 deletions
|
@ -8,4 +8,10 @@ function finish {
|
||||||
trap finish EXIT
|
trap finish EXIT
|
||||||
trap finish SIGTERM
|
trap finish SIGTERM
|
||||||
|
|
||||||
bash --init-file <(echo "source ~/.bashrc; pushd $scratch > /dev/null")
|
if [ -z $1 ]
|
||||||
|
then
|
||||||
|
bash --init-file <(echo "source ~/.bashrc; pushd $scratch > /dev/null")
|
||||||
|
else
|
||||||
|
cd $scratch
|
||||||
|
"$@"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue