From 756a2315d96922f0fc512ef45370933a88495f9d Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 16 Nov 2022 03:16:57 -0800 Subject: [PATCH] ci: Fixes --- ci/release/template/scripts/install.sh | 4 ++-- ci/release/template/scripts/lib.sh | 4 ++++ ci/release/template/scripts/uninstall.sh | 2 +- ci/sub | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/release/template/scripts/install.sh b/ci/release/template/scripts/install.sh index 4b4ae2d08..043e5d098 100755 --- a/ci/release/template/scripts/install.sh +++ b/ci/release/template/scripts/install.sh @@ -4,14 +4,14 @@ cd -- "$(dirname "$0")/.." . ./scripts/lib.sh main() { - if [ ! -e "${PREFIX-}" ]; then + if [ -z "${PREFIX-}" ]; then echoerr "\$PREFIX must be set to a unix prefix directory in which to install d2 like /usr/local" return 1 fi sh_c mkdir -p "$PREFIX/bin" - sh_c mkdir -p "$PREFIX/share/man/man1" sh_c install ./bin/d2 "$PREFIX/bin/d2" + sh_c mkdir -p "$PREFIX/share/man/man1" sh_c install ./man/d2.1 "$PREFIX/share/man/man1" } diff --git a/ci/release/template/scripts/lib.sh b/ci/release/template/scripts/lib.sh index 95244284d..0a232eb74 100644 --- a/ci/release/template/scripts/lib.sh +++ b/ci/release/template/scripts/lib.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ -n "${DEBUG-}" ]; then + set -x +fi + rand() { seed="$1" range="$2" diff --git a/ci/release/template/scripts/uninstall.sh b/ci/release/template/scripts/uninstall.sh index d195463f3..e21877ca9 100755 --- a/ci/release/template/scripts/uninstall.sh +++ b/ci/release/template/scripts/uninstall.sh @@ -4,7 +4,7 @@ cd -- "$(dirname "$0")/.." . ./scripts/lib.sh main() { - if [ ! -e "${PREFIX-}" ]; then + if [ -z "${PREFIX-}" ]; then echoerr "\$PREFIX must be set to a unix prefix directory from which to uninstall d2 like /usr/local" return 1 fi diff --git a/ci/sub b/ci/sub index 237ad4b4b..75d882344 160000 --- a/ci/sub +++ b/ci/sub @@ -1 +1 @@ -Subproject commit 237ad4b4bc52c0b27eb9d9b7e1496d8a9453dd05 +Subproject commit 75d882344578aa409a8f81c8f1ee931e0f0297d0