d2/ci/release/template/scripts/install.sh
2022-12-08 02:41:04 -08:00

21 lines
396 B
Bash
Executable file

#!/bin/sh
set -eu
cd -- "$(dirname "$0")/.."
. ./scripts/lib.sh
main() {
ensure_prefix_sh_c
"$sh_c" mkdir -p "$PREFIX/bin"
ensure_os
if [ "$OS" = windows ]; then
"$sh_c" install ./bin/d2.exe "$PREFIX/bin/d2.exe"
else
"$sh_c" install ./bin/d2 "$PREFIX/bin/d2"
fi
"$sh_c" mkdir -p "$PREFIX/share/man/man1"
"$sh_c" install ./man/d2.1 "$PREFIX/share/man/man1"
}
main "$@"