From e97adc401a0b6478b29796ab53b447cb234b32ad Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 27 May 2024 18:19:46 +0200 Subject: handle request for help first --- bin/pacman-offline | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/pacman-offline b/bin/pacman-offline index cf7d7c0..ae657fb 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -24,6 +24,16 @@ CLEAN=0 REBOOT=0 TIMER=0 +while getopts 'cfhrty' opt; do + case ${opt} in + h) + help + exit 0 + ;; + esac +done + +OPTIND=1 while getopts 'cfhrty' opt; do case ${opt} in c) @@ -36,10 +46,6 @@ while getopts 'cfhrty' opt; do f) rm -f /system-update ;; - h) - help - exit 0 - ;; r) REBOOT=1 ;; -- cgit v1.2.3-70-g09d2