diff --git a/README.md b/README.md index b254349..39b7d80 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,15 @@ git clone https://github.com/AustrianToast/update.git && cd update Before installing, please edit the config and configure it to your liking. +Then install using ```bash make install ``` - -You will likely have to +or +```bash +just install +``` +======= ## Usage @@ -34,4 +38,4 @@ no flag same as -p ## Contributing -Contributions are always welcome! \ No newline at end of file +Contributions are always welcome! diff --git a/justfile b/justfile new file mode 100644 index 0000000..f3a4963 --- /dev/null +++ b/justfile @@ -0,0 +1,12 @@ +VER := "v1.7" + +install: + @echo "==> Installing update {{VER}} into /usr/local/bin" + @sudo install -Dm755 update /usr/local/bin/update + @cp update.conf ${HOME}/.config/ + @echo "==> Finished." + +uninstall: + @echo "==> Uninstalling update {{VER}} from /usr/local/bin" + @sudo rm /usr/local/bin/update ${HOME}/.config/update.conf + @echo "==> Finished." diff --git a/update b/update index f4ed718..3dc6ec1 100644 --- a/update +++ b/update @@ -86,11 +86,11 @@ while getopts 'fpagr' OPTIONS; do a) update_with_pacman_wrapper; update_with_flatpak ;; g) - [[ $1 = -g ]] && update_with_pacman_wrapper; update_with_flatpak + [[ $1 = -g ]] && update_with_pacman_wrapper after_backup && echo -e "${IGREEN}after-backup complete${NC}" && sleep 3s && shutdown now exit 0;; r) - [[ $1 = -r ]] && update_with_pacman_wrapper; update_with_flatpak + [[ $1 = -r ]] && update_with_pacman_wrapper after_backup && echo -e "${IGREEN}after-backup complete${NC}" && sleep 3s && reboot exit 0;; ?)