ci/release: Many more fixes
This commit is contained in:
parent
926a2d7901
commit
70a80fa36b
5 changed files with 39 additions and 6 deletions
|
|
@ -185,12 +185,22 @@ install() {
|
|||
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
||||
logcat >&2 <<EOF
|
||||
Extend your path to use d2:
|
||||
PATH=$PREFIX/bin:\$PATH
|
||||
export PATH=$PREFIX/bin:\$PATH
|
||||
Then run:
|
||||
d2 --help
|
||||
EOF
|
||||
else
|
||||
log "You may now run d2 --help"
|
||||
log "You may run d2 --help"
|
||||
fi
|
||||
if ! manpath | grep -qF "$PREFIX/share/man"; then
|
||||
logcat >&2 <<EOF
|
||||
Extend your \$MANPATH to view d2's manpages:
|
||||
export MANPATH=$PREFIX/share/man\${MANPATH+:\$MANPATH}
|
||||
Then run:
|
||||
man d2
|
||||
EOF
|
||||
else
|
||||
log "You may run man d2 to view documentation."
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ set -eu
|
|||
cd -- "$(dirname "$0")/../.."
|
||||
. ./ci/sub/lib.sh
|
||||
|
||||
chmod +w ./install.sh
|
||||
cat >./install.sh <<EOF
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
|
@ -35,3 +36,4 @@ sh_c cat \
|
|||
\| sed "-e'/^\. /d'" \>\> ./install.sh
|
||||
sh_c cat ./ci/release/_install.sh \
|
||||
\| sed -n "'/cd -- \"\$(dirname/,/cd -/!p'" \>\> install.sh
|
||||
chmod -w install.sh
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ main() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
sh_c mkdir -p "$PREFIX"
|
||||
sh_c mkdir -p "$PREFIX/bin"
|
||||
sh_c mkdir -p "$PREFIX/share/man/man1"
|
||||
sh_c install ./bin/d2 "$PREFIX/bin/d2"
|
||||
sh_c install ./man/d2.1 "$PREFIX/share/man/man1"
|
||||
}
|
||||
|
|
|
|||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
|||
Subproject commit 9efc8337b86eaebf0fbc9b4c2202f1bdcf156a7d
|
||||
Subproject commit db0f045304ba1d69b85043d02c76891b75be6f0e
|
||||
24
install.sh
24
install.sh
|
|
@ -423,6 +423,16 @@ arch() {
|
|||
gh_repo() {
|
||||
gh repo view --json nameWithOwner --template '{{ .nameWithOwner }}'
|
||||
}
|
||||
|
||||
manpath() {
|
||||
if command -v manpath >/dev/null; then
|
||||
command manpath
|
||||
elif man -w 2>/dev/null; then
|
||||
man -w
|
||||
else
|
||||
echo "${MANPATH-}"
|
||||
fi
|
||||
}
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
|
|
@ -605,12 +615,22 @@ install() {
|
|||
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
||||
logcat >&2 <<EOF
|
||||
Extend your path to use d2:
|
||||
PATH=$PREFIX/bin:\$PATH
|
||||
export PATH=$PREFIX/bin:\$PATH
|
||||
Then run:
|
||||
d2 --help
|
||||
EOF
|
||||
else
|
||||
log "You may now run d2 --help"
|
||||
log "You may run d2 --help"
|
||||
fi
|
||||
if ! manpath | grep -qF "$PREFIX/share/man"; then
|
||||
logcat >&2 <<EOF
|
||||
Extend your \$MANPATH to view d2's manpages:
|
||||
export MANPATH=$PREFIX/share/man\${MANPATH+:\$MANPATH}
|
||||
Then run:
|
||||
man d2
|
||||
EOF
|
||||
else
|
||||
log "You may run man d2 to view documentation."
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue