diff options
author | Christian Hesse <mail@eworm.de> | 2017-09-24 23:31:16 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-09-24 23:44:32 +0200 |
commit | df10bb52910ae614ed9dce88540be7f7058cb1c5 (patch) | |
tree | b6ae39c107c595fbfb41f0382a97b382845f4f6e /bin | |
parent | b0b0e857759e72530c347f077ca5923ac757d78f (diff) | |
download | pacman-offline-df10bb52910ae614ed9dce88540be7f7058cb1c5.tar.gz pacman-offline-df10bb52910ae614ed9dce88540be7f7058cb1c5.tar.zst |
add refresh and help options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pacman-offline | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline index 33b2461..aae47ef 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -2,6 +2,25 @@ set -e +function help() { + echo "usage: ${0} [OPTIONS]" + echo + echo ' -h this help' + echo ' -y update sync databases' +} + +while getopts 'hy' opt; do + case ${opt} in + h) + help + exit 0 + ;; + y) + pacman -Sy + ;; + esac +done + # check for available updates if ! pacman -Qu >/dev/null; then echo "No updates available." |