diff --git a/antp.sh b/antp.sh index 0c40749..ebc2ddb 100755 --- a/antp.sh +++ b/antp.sh @@ -1,9 +1,11 @@ #!/bin/sh -e -readonly this=$(readlink -f -- "$0") -readonly dir=$(dirname -- "$this") readonly module=antp -cd -- "$dir" || exit +if ! [ -d "$module" ]; then + readonly this=$(readlink -f -- "$0") + readonly dir=$(dirname -- "$this") + cd -- "$dir" || exit 1 +fi python3 -m "$module" "$@"