d2/ci/release/template/scripts/install.sh

22 lines
392 B
Bash
Raw Normal View History

2022-11-11 09:17:06 +00:00
#!/bin/sh
set -eu
2022-11-12 22:19:09 +00:00
cd -- "$(dirname "$0")/.."
. ./scripts/lib.sh
2022-11-11 09:17:06 +00:00
main() {
ensure_prefix_sh_c
"$sh_c" mkdir -p "$PREFIX/bin"
ensure_os
if [ "$OS" = windows ]; then
"$sh_c" install ./bin/d2 "$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"
2022-11-11 09:17:06 +00:00
}
main "$@"