diff options
-rwxr-xr-x | check | 26 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | subplot/jt.py | 3 |
3 files changed, 15 insertions, 15 deletions
@@ -3,26 +3,23 @@ set -eu verbose=false -if [ "$#" -gt 0 ] -then - case "$1" in +if [ "$#" -gt 0 ]; then + case "$1" in verbose | -v | --verbose) - verbose=true - shift - ;; - esac + verbose=true + shift + ;; + esac fi hideok= -if command -v chronic > /dev/null -then - hideok=chronic +if command -v chronic >/dev/null; then + hideok=chronic fi -if $verbose -then - hideok= +if $verbose; then + hideok= fi $hideok cargo check --all-targets @@ -38,6 +35,7 @@ $hideok subplot docgen jt.md --output jt.pdf $hideok subplot codegen jt.md --output test.py rm -f test.log -$hideok python3 test.py --log test.log "$@" +target="$(cargo metadata --format-version=1 | jq -r .target_directory)" +$hideok python3 test.py --log test.log --env "CARGO_TARGET_DIR=$target" "$@" echo "Everything seems to be in order." diff --git a/debian/control b/debian/control index 336dd98..332bbe5 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: build-essential, black, dh-cargo, + jq, moreutils, python3, subplot, diff --git a/subplot/jt.py b/subplot/jt.py index dfdf44c..416e830 100644 --- a/subplot/jt.py +++ b/subplot/jt.py @@ -8,7 +8,8 @@ def install_jt(ctx): runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"] srcdir = globals()["srcdir"] - bindir = os.path.join(srcdir, "target", "debug") + target = os.environ.get("CARGO_TARGET_DIR", os.path.join(srcdir, "target")) + bindir = os.path.join(target, "debug") runcmd_prepend_to_path(ctx, bindir) # Configure git. |