From: hayao Date: Sun, 20 Dec 2020 00:03:59 +0000 (+0900) Subject: [update] : Added wfa help X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4b82f766d60f70ceb39a887048d21b27f2197e54;p=alterlinux%2Fwfa.git [update] : Added wfa help --- diff --git a/wfa b/wfa index 08887e1..e1d4c00 100755 --- a/wfa +++ b/wfa @@ -348,6 +348,8 @@ remove() { } usage (){ + local _pacman_help=false + local _wfa_usage _wfa_usage() { echo "Usage:" @@ -366,10 +368,24 @@ usage (){ #echo "wfa {-U --upgrade} [options] " } + local _wfa_usage_sync + _wfa_usage_sync() { + echo "usage: wfa {-S --sync} [options] [package(s)]" + echo "options:" + echo " -b, --dbpath set an alternate database location" + echo " --config set an alternate configuration file" + echo " --noconfirm do not ask for any confirmation" + + } + if [[ "${operation}" = "none" ]]; then _wfa_usage - else + elif [[ "${_pacman_help}" = true ]]; then pacman -h --${operation} + elif [[ "$(type -t "_wfa_usage_${operation}" )" = "function" ]]; then + _wfa_usage_${operation} + else + msg_error "Undefined operation." 1 fi }