]> Nishi Git Mirror - gwion.git/commitdiff
OpenBSD seq alias settings for scripts/test.sh (#244)
authorNishiOwO <89888985+NishiOwO@users.noreply.github.com>
Sun, 17 Apr 2022 15:34:02 +0000 (00:34 +0900)
committerGitHub <noreply@github.com>
Sun, 17 Apr 2022 15:34:02 +0000 (17:34 +0200)
* NetBSD / OpenBSD Support

* OpenBSD seq alias settings

scripts/test.sh

index e056831114d616b3181935df7c9e41d73c1324d2..c97d6e5a4031da3615669902df77ec9560d56674 100644 (file)
@@ -1,5 +1,19 @@
 #!/bin/bash
 
+if [ "$(uname -s)" = "OpenBSD" ]; then
+       gseq --version >/dev/null 2>&1
+       if [ $? -ne 0 ]; then
+               echo "gseq was not found."
+               echo "You can install gseq with installing coreutils, should we install it?"
+               read -p "(y/N): " yn
+               case "$yn" in
+                       [yY]*) doas pkg_add coreutils;;
+                       *) echo "Test aborted." ; exit 1;;
+               esac
+       fi
+       alias seq="gseq"
+fi
+
 : "${PRG:=gwion}"
 : "${GWION_TEST_DIR:=/tmp}"
 : "${GWION_TEST_PREFIX:=gwt_}"
@@ -405,4 +419,3 @@ then
 else
   exit 0
 fi
-