...
1#!/bin/sh
2set -eu
3cd -- "$(dirname "$0")/../../.."
4. ./ci/sub/lib.sh
5
6ensure_os
7ensure_arch
8cat <<EOF
9# d2
10
11For docs, more installation options and the source code see https://oss.terrastruct.com/d2
12
13version: $VERSION
14os: $OS
15arch: $ARCH
16
17Built with $(go version | grep -o 'go[^ ]\+').
18EOF
19
20if [ "$OS" = windows ]; then
21 cat <<EOF
22
23This release is structured the same as our Unix releases for use with MSYS2.
24
25You may find our \`.msi\` installer more convenient as it handles putting \`d2.exe\` into
26your \`\$PATH\` for you.
27
28See https://github.com/terrastruct/d2/blob/master/docs/INSTALL.md#windows
29EOF
30fi
31
32cat <<EOF
33
34## Install
35
36\`\`\`sh
37make install DRY_RUN=1
38# If it looks right, run:
39# make install
40\`\`\`
41
42Pass \`PREFIX=somepath\` to change the installation prefix from the default which is
43\`/usr/local\` or \`~/.local\` if \`/usr/local\` is not writable with the current user.
44
45## Uninstall
46
47\`\`\`sh
48make uninstall DRY_RUN=1
49# If it looks right, run:
50# make uninstall
51\`\`\`
52EOF
View as plain text