GithubHelp home page GithubHelp logo

Comments (1)

heeler-deer avatar heeler-deer commented on June 16, 2024 1

hi ,i'm using ubuntu and face the same challenge
i modify the uninstall.sh like that:

#!/usr/bin/env bash

export check="\xE2\x9C\x94"
export cross="\xE2\x9D\x8C"
command=$1
if [[  ! $command =~ native|web ]]; then
	printf "\nSelect which version you would want to uninstall:\n\n"
	select command in web native
	do
		if [[ $command =~ native|web ]]; then
			echo $command
			break
		else
			echo "Please input 1 or 2"
		fi
	done
fi
uninstall_prep() {
  export install_dir
  export shortcut_dir
  export exec_dir

  local share_dir
  share_dir="/usr/share"

  if [[ -d ${share_dir}/lotion ]]; then
    install_dir="${share_dir}/lotion-$command"
    shortcut_dir="${share_dir}/applications"
    exec_dir="/usr/bin"
  else
    install_dir="$(pwd)/Lotion-$command"
    shortcut_dir="/usr/share/applications"
    exec_dir="/usr/bin"
  fi
}

delete_directory() {
  if [[ -d "${install_dir}" ]]; then
    rm -Rf "${install_dir}" || exit
    echo -e "${check} ${install_dir} was successfully deleted."
  else
    echo -e "${cross} ${install_dir} directory was not found. Skipping."
  fi
}
if [[ $command == 'web' ]]; then
  shortcut_file=Lotion.desktop
else
  shortcut_file=Notion_native.desktop
fi

delete_files() {
  declare -a files
  files=("${shortcut_dir}/${shortcut_file}" "${exec_dir}/lotion-$command" "${exec_dir}/lotion_uninstall")

  for file in "${files[@]}"; do
    if [[ -f "${file}" ]]; then
      rm "${file}" || exit
      echo -e "${cross} ${file} was successfully deleted."
    else
      echo -e "${cross} ${file} was not found. Skipping."
    fi
  done
}

uninstall_prep
delete_directory
delete_files

you should modify last 2 lines in function uninstall_prep() for your path

from lotion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.