~adigitoleo/geobits

399a1ac077cbe81da0f224557665bed0a2dd4f5f — adigitoleo 8 months ago e1dc472
fix: Fix shellcheck errors
2 files changed, 6 insertions(+), 6 deletions(-)

M tools/q,del.sh
M tools/q,stat.sh
M tools/q,del.sh => tools/q,del.sh +3 -3
@@ 1,6 1,6 @@
#!/bin/sh
set -eu
helpf() { echo 'q,del <REFFILE> -- delete/abort PBS job using ID read from REFFILE' }
helpf() { echo 'q,del <REFFILE> -- delete/abort PBS job using ID read from REFFILE'; }
is_command() {
    if 1>/dev/null 2>&1 command -v "$1"; then
        return 0


@@ 12,5 12,5 @@ warn() { >&2 printf '%s\n' "$SCRIPTNAME: $1"; }
is_command qdel || { warn 'missing required executable: qdel'; exit 1; }

[ $# -eq 0 ] && { helpf; exit 1; }
[ $1 = "-h" ] && { helpf; exit 1; }
qdel $(cat "$1")
[ "$1" = "-h" ] && { helpf; exit 1; }
qdel "$(cat "$1")"

M tools/q,stat.sh => tools/q,stat.sh +3 -3
@@ 1,6 1,6 @@
#!/bin/sh
set -eu
helpf() { echo 'q,stat <REFFILE> -- show PBS job status of job ID read from REFFILE' }
helpf() { echo 'q,stat <REFFILE> -- show PBS job status of job ID read from REFFILE'; }
is_command() {
    if 1>/dev/null 2>&1 command -v "$1"; then
        return 0


@@ 12,5 12,5 @@ warn() { >&2 printf '%s\n' "$SCRIPTNAME: $1"; }
is_command qstat || { warn 'missing required executable: qstat'; exit 1; }

[ $# -eq 0 ] && { helpf; exit 1; }
[ $1 = "-h" ] && { helpf; exit 1; }
qstat -s1x $(cat "$1")
[ "$1" = "-h" ] && { helpf; exit 1; }
qstat -s1x "$(cat "$1")"