summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline19
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."