Merge pull request #114 from terrastruct/alixander/highlight-install-instructions
install: add callout to next steps in terminal display
This commit is contained in:
commit
43947e518a
2 changed files with 26 additions and 8 deletions
|
|
@ -181,8 +181,14 @@ install() {
|
||||||
if [ -n "${TALA-}" ]; then
|
if [ -n "${TALA-}" ]; then
|
||||||
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
|
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
|
||||||
fi
|
fi
|
||||||
|
log "Rerun this install script with --uninstall to uninstall"
|
||||||
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
||||||
logcat >&2 <<EOF
|
logcat >&2 <<EOF
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
NEXT STEPS
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
Extend your \$PATH to use d2:
|
Extend your \$PATH to use d2:
|
||||||
export PATH=$PREFIX/bin:\$PATH
|
export PATH=$PREFIX/bin:\$PATH
|
||||||
Then run:
|
Then run:
|
||||||
|
|
@ -207,8 +213,11 @@ EOF
|
||||||
log " Run man d2plugin-tala for detailed docs."
|
log " Run man d2plugin-tala for detailed docs."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
logcat >&2 <<EOF
|
||||||
|
|
||||||
log "Rerun the install script with --uninstall to uninstall"
|
Something not working? Please let us know:
|
||||||
|
https://github.com/terrastruct/d2/issues/new
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
install_d2() {
|
install_d2() {
|
||||||
|
|
@ -309,7 +318,7 @@ uninstall_standalone_d2() {
|
||||||
|
|
||||||
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
|
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
|
||||||
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
|
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
|
||||||
warn "d2 have been installed via some other installation method."
|
warn "d2 must have been installed via some other installation method."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -332,7 +341,7 @@ uninstall_standalone_tala() {
|
||||||
|
|
||||||
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
|
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
|
||||||
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
|
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
|
||||||
warn "tala have been installed via some other installation method."
|
warn "tala must have been installed via some other installation method."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
19
install.sh
19
install.sh
|
|
@ -186,7 +186,7 @@ This script needs to run the following command as root:
|
||||||
$*
|
$*
|
||||||
Please install doas, sudo, or su.
|
Please install doas, sudo, or su.
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,7 +214,7 @@ hide() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
cat "$out" >&2
|
cat "$out" >&2
|
||||||
exit "$code"
|
return "$code"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_dur() {
|
echo_dur() {
|
||||||
|
|
@ -615,8 +615,14 @@ install() {
|
||||||
if [ -n "${TALA-}" ]; then
|
if [ -n "${TALA-}" ]; then
|
||||||
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
|
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
|
||||||
fi
|
fi
|
||||||
|
log "Rerun this install script with --uninstall to uninstall"
|
||||||
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
|
||||||
logcat >&2 <<EOF
|
logcat >&2 <<EOF
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
NEXT STEPS
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
Extend your \$PATH to use d2:
|
Extend your \$PATH to use d2:
|
||||||
export PATH=$PREFIX/bin:\$PATH
|
export PATH=$PREFIX/bin:\$PATH
|
||||||
Then run:
|
Then run:
|
||||||
|
|
@ -641,8 +647,11 @@ EOF
|
||||||
log " Run man d2plugin-tala for detailed docs."
|
log " Run man d2plugin-tala for detailed docs."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
logcat >&2 <<EOF
|
||||||
|
|
||||||
log "Rerun the install script with --uninstall to uninstall"
|
Something not working? Please let us know:
|
||||||
|
https://github.com/terrastruct/d2/issues/new
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
install_d2() {
|
install_d2() {
|
||||||
|
|
@ -743,7 +752,7 @@ uninstall_standalone_d2() {
|
||||||
|
|
||||||
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
|
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
|
||||||
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
|
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
|
||||||
warn "d2 have been installed via some other installation method."
|
warn "d2 must have been installed via some other installation method."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -766,7 +775,7 @@ uninstall_standalone_tala() {
|
||||||
|
|
||||||
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
|
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
|
||||||
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
|
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
|
||||||
warn "tala have been installed via some other installation method."
|
warn "tala must have been installed via some other installation method."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue