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 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 standalone for uninstallation. With detect, the install script will try to use the OS
package manager to uninstall instead. 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 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> path of the cached assets. Release archives are unarchived into /usr/local/lib/d2/d2-<VERSION>
@ -376,7 +377,6 @@ install_tala_brew() {
uninstall() { uninstall() {
# We uninstall tala first as package managers require that it be uninstalled before # We uninstall tala first as package managers require that it be uninstalled before
# uninstalling d2 as TALA depends on d2. # uninstalling d2 as TALA depends on d2.
if [ "${TALA-}" ]; then
if command -v d2plugin-tala >/dev/null; then if command -v d2plugin-tala >/dev/null; then
INSTALLED_VERSION="$(d2plugin-tala --version)" INSTALLED_VERSION="$(d2plugin-tala --version)"
header "uninstalling tala-$INSTALLED_VERSION" header "uninstalling tala-$INSTALLED_VERSION"
@ -384,10 +384,9 @@ uninstall() {
standalone) uninstall_tala_standalone ;; standalone) uninstall_tala_standalone ;;
homebrew) uninstall_tala_brew ;; homebrew) uninstall_tala_brew ;;
esac esac
else elif [ "${TALA-}" ]; then
warn "no version of tala installed" warn "no version of tala installed"
fi fi
fi
if ! command -v d2 >/dev/null; then if ! command -v d2 >/dev/null; then
warn "no version of d2 installed" warn "no version of d2 installed"

View file

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