Skip to content

Commit

Permalink
use a more robust way for getting the script directory
Browse files Browse the repository at this point in the history
This fixes calling the script from dash

(cherry picked from commit 7c5be21)
  • Loading branch information
razvancrainea committed Nov 24, 2023
1 parent 48e21f6 commit 145a387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-all.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

yaml_list() {
test -n "${BASH_SOURCE[0]}" && DIR="$(dirname "${BASH_SOURCE[0]}")" || DIR=.
DIR="$(dirname -- "$(readlink "$0")")"
python3 -c "import yaml;print(' '.join(yaml.safe_load(open('$DIR/environment.yml'))['$1']))"
}

Expand Down

0 comments on commit 145a387

Please sign in to comment.