added help long option

This commit is contained in:
René Fuhry 2023-01-10 19:20:34 +01:00 committed by GitHub
parent 84d0e162d1
commit a4ca632c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

5
update
View File

@ -2,7 +2,7 @@
# shellcheck source=/dev/null
# updates via an aur-helper and flatpak with flags
# version 0.7
# version 0.8
# add options to change aur-helper in the config
# maybe make a first time setup, which asks for backup_location and aur_helper, maybe even if you wanna opt-in to non-interactive flatpak-update (maybe a flag?)
@ -26,6 +26,7 @@ Help() {
echo "-a updates using flatpak update and an aur-helper"
echo "-g shutdowns the computer afterwards (needs to be the last or only option to work properly)"
echo "-r reboots the computer afterwards (needs to be the last or only option to work properly)"
echo "--help shows usage"
}
# creates package lists, moves them into a zip, adds some other files to the zip and backups the pacman database in the form of a tar
@ -60,6 +61,8 @@ update_with_flatpak() {
flatpak list > ~/flatpak-after.txt
}
[[ $1 = --help ]] && Help && exit 0;
before_backup && echo -e "${IGreen} pre-backup complete ${NC}"
[[ -z $1 ]] && update_with_aur_helper && update_with_flatpak;

View File

@ -1,5 +1,5 @@
# Backup to this folder
backup_location=~/
backup_location=~/balls
# use this aur-helper
aur_helper=yay
aur_helper=paru