diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-14 00:08:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-14 00:08:30 +0300 |
| commit | aabe2efbb79938dbbdb4f0ab496cdc22e7280736 (patch) | |
| tree | 6c92e044160f783aafbcec56b2d3fe0a0bf75afe | |
| parent | f9291765b363809ff4e75ff441d374ecef3ad40a (diff) | |
km0 address job pool review
| -rwxr-xr-x | bin/shuriken | 6 | ||||
| -rwxr-xr-x | src/shuriken.sh | 6 | ||||
| -rwxr-xr-x | tests/cli.sh | 4 |
3 files changed, 15 insertions, 1 deletions
diff --git a/bin/shuriken b/bin/shuriken index e6af2cb..2efd49a 100755 --- a/bin/shuriken +++ b/bin/shuriken @@ -4,6 +4,12 @@ set -euo pipefail # shuriken (c) 2011 - 2014, 2022 by Paul Buetow # https://codeberg.org/snonux/shuriken.sh +if (( BASH_VERSINFO[0] < 5 \ + || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] < 1) )); then + printf 'ERROR: shuriken requires Bash 5.1 or newer\n' >&2 + exit 1 +fi + declare -r VERSION='0.7.0' declare -r DEFAULTRC="${SHURIKEN_DEFAULT_RC:-/etc/default/shuriken}" declare -r PACKAGED_TEMPLATE_DIR='/usr/share/shuriken/templates/default' diff --git a/src/shuriken.sh b/src/shuriken.sh index 4474600..482484c 100755 --- a/src/shuriken.sh +++ b/src/shuriken.sh @@ -4,6 +4,12 @@ set -euo pipefail # shuriken (c) 2011 - 2014, 2022 by Paul Buetow # https://codeberg.org/snonux/shuriken.sh +if (( BASH_VERSINFO[0] < 5 \ + || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] < 1) )); then + printf 'ERROR: shuriken requires Bash 5.1 or newer\n' >&2 + exit 1 +fi + declare -r VERSION='SHURIKENVERSION' declare -r DEFAULTRC="${SHURIKEN_DEFAULT_RC:-/etc/default/shuriken}" declare -r PACKAGED_TEMPLATE_DIR='/usr/share/shuriken/templates/default' diff --git a/tests/cli.sh b/tests/cli.sh index f971085..d6fbbd4 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -1221,6 +1221,7 @@ test_generate_parallel_template_failure_logs_photo() { printf 'exit 127\n' > "$template_dir/details.tmpl" mkdir -p "$TEST_TMPDIR/incoming" "$TEST_TMPDIR/dist" printf 'fake image\n' > "$TEST_TMPDIR/incoming/01.jpg" + printf 'fake image\n' > "$TEST_TMPDIR/incoming/02.jpg" printf 'old dist\n' > "$TEST_TMPDIR/dist/index.html" test::write_album_config \ "$config_file" "$TEST_TMPDIR/incoming" "$TEST_TMPDIR/dist" \ @@ -1230,7 +1231,8 @@ test_generate_parallel_template_failure_logs_photo() { output=$( cd "$TEST_TMPDIR" PATH="$fake_bin:$PATH" \ - test::capture_failure_output "$TEST_SHURIKEN" --generate + test::capture_failure_output \ + "$TEST_SHURIKEN" --image-jobs 1 --generate ) test::assert_contains \ |
