fix tliam script not exit code failing on fail
This commit is contained in:
14
tliam
14
tliam
@@ -1,11 +1,19 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
git add .
|
||||
declare -a cmd
|
||||
if [ "$HOST" = "triple-dezert" ]; then
|
||||
nix run .'#'checks.x86_64-linux.liam.driver -- "$@" && echo "SUCCESS" || echo "FAIL"
|
||||
cmd=(nix run .'#'checks.x86_64-linux.liam.driver -- "$@")
|
||||
else
|
||||
nix copy -v .'#'checks.x86_64-linux.liam.driver --to ssh://trip
|
||||
ssh trip -- sudo "$(nix path-info .'#'checks.x86_64-linux.liam.driver)/bin/nixos-test-driver" "$@" && echo "SUCCESS" || echo "FAIL"
|
||||
cmd=(ssh trip -- sudo "$(nix path-info .'#'checks.x86_64-linux.liam.driver)/bin/nixos-test-driver" "$@")
|
||||
fi
|
||||
|
||||
if "${cmd[@]}"; then
|
||||
echo "SUCCESS"
|
||||
else
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user