diff --git a/run b/run index 23c9035..d997964 100755 --- a/run +++ b/run @@ -1,5 +1,25 @@ #!/bin/bash +# The following block allows to use the `run` script like this +# ``` +# ln -s run a_script.sh +# ./a_script.sh +# ``` +# which then runs `./run a_script.py` + +fn=$(basename $0) +if [ "$fn" != "run" ]; then + dn=$(dirname "$0") + sn=$(basename "$0" .sh) + dn="${dn}/run" + sn="${sn}.py" + echo "Running: $dn $sn" + $dn $sn + exit +fi + +### + function help() { echo "Load conda env and run a script" echo