Document one-line upgrade via install.sh re-run
Clarify that re-running the curl installer upgrades in place, and detect an existing install so the script prints an Updating message. Co-authored-by: Frank Vitrano <WHC2006@users.noreply.github.com>
This commit is contained in:
co-authored by
Frank Vitrano
parent
a4f4767c47
commit
7380d7c4b8
+9
-3
@@ -22,9 +22,11 @@ for arg in "$@"; do
|
||||
cat <<'EOF'
|
||||
Usage: install.sh [--user] [--uninstall]
|
||||
|
||||
(default) Install system-wide to /usr/local (needs sudo)
|
||||
--user Install to ~/.local (no sudo for the link)
|
||||
(default) Install or upgrade system-wide to /usr/local (needs sudo)
|
||||
--user Install or upgrade to ~/.local (no sudo for the link)
|
||||
--uninstall Remove installed miaur
|
||||
|
||||
Re-running this script upgrades an existing install in place.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
@@ -108,7 +110,11 @@ do_install() {
|
||||
|
||||
[[ -f $SRC/miaur && -d $SRC/lib ]] || die "incomplete source tree: $SRC"
|
||||
|
||||
echo "==> Installing to ${SHARE_DIR}"
|
||||
if [[ -e $BIN_LINK || -d $SHARE_DIR ]]; then
|
||||
echo "==> Updating existing install at ${SHARE_DIR}"
|
||||
else
|
||||
echo "==> Installing to ${SHARE_DIR}"
|
||||
fi
|
||||
$SUDO mkdir -p "$SHARE_DIR" "${PREFIX}/bin"
|
||||
$SUDO rm -rf "$SHARE_DIR"
|
||||
$SUDO mkdir -p "$SHARE_DIR"
|
||||
|
||||
Reference in New Issue
Block a user