install.sh: --uninstall implies uninstall tala too

This commit is contained in:
Anmol Sethi 2022-11-20 20:37:06 -08:00
parent c9184cf5a7
commit af63417892
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA
2 changed files with 20 additions and 22 deletions

View file

@ -82,6 +82,7 @@ Flags:
as for installation. i.e if you used --method standalone you must again use --method
standalone for uninstallation. With detect, the install script will try to use the OS
package manager to uninstall instead.
note: tala will also be uninstalled if installed.
All downloaded archives are cached into ~/.cache/d2/release. use \$XDG_CACHE_HOME to change
path of the cached assets. Release archives are unarchived into /usr/local/lib/d2/d2-<VERSION>
@ -376,17 +377,15 @@ install_tala_brew() {
uninstall() {
# We uninstall tala first as package managers require that it be uninstalled before
# uninstalling d2 as TALA depends on d2.
if [ "${TALA-}" ]; then
if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)"
header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in
standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;;
esac
else
warn "no version of tala installed"
fi
if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)"
header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in
standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;;
esac
elif [ "${TALA-}" ]; then
warn "no version of tala installed"
fi
if ! command -v d2 >/dev/null; then

View file

@ -546,6 +546,7 @@ Flags:
as for installation. i.e if you used --method standalone you must again use --method
standalone for uninstallation. With detect, the install script will try to use the OS
package manager to uninstall instead.
note: tala will also be uninstalled if installed.
All downloaded archives are cached into ~/.cache/d2/release. use \$XDG_CACHE_HOME to change
path of the cached assets. Release archives are unarchived into /usr/local/lib/d2/d2-<VERSION>
@ -840,17 +841,15 @@ install_tala_brew() {
uninstall() {
# We uninstall tala first as package managers require that it be uninstalled before
# uninstalling d2 as TALA depends on d2.
if [ "${TALA-}" ]; then
if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)"
header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in
standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;;
esac
else
warn "no version of tala installed"
fi
if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)"
header "uninstalling tala-$INSTALLED_VERSION"
case $METHOD in
standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;;
esac
elif [ "${TALA-}" ]; then
warn "no version of tala installed"
fi
if ! command -v d2 >/dev/null; then