Merge pull request #12 from AustrianToast/dev

Created Justfile and updated README
This commit is contained in:
René Fuhry 2023-03-29 15:37:30 +02:00 committed by GitHub
commit cf69e69377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View File

@ -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

12
justfile Normal file
View File

@ -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."

4
update
View File

@ -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;;
?)