d2/ci/release/template/scripts/install.sh
2022-11-13 22:49:46 -08:00

16 lines
307 B
Bash
Executable file

#!/bin/sh
set -eu
cd -- "$(dirname "$0")/.."
. ./scripts/lib.sh
main() {
if [ ! -e "${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"
sh_c install ./bin/d2 "$PREFIX/bin/d2"
}
main "$@"