From 2beb1c0638de88160bc2d121c004e8bc4aa33c83 Mon Sep 17 00:00:00 2001 From: fbt Date: Tue, 26 Nov 2019 01:53:22 +0300 Subject: [PATCH] these have no reason not to be flags Signed-off-by: fbt --- ufw | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/ufw b/ufw index 85e8144..11192fb 100755 --- a/ufw +++ b/ufw @@ -386,37 +386,42 @@ main() { while [[ "$1" ]]; do case "$1" in - -h|--help|--usage) usage; return;; - -D|--screenshot-delay) cfg_scn_delay="$2"; shift;; - -m|--max-filesize) cfg_max_filesize=$2; shift;; - -A|--album-name) album_name=$2; shift;; - -t|--tags) tags=$2; shift;; + (-h|--help|--usage) usage; return;; + (-D|--screenshot-delay) cfg_scn_delay="$2"; shift;; + (-m|--max-filesize) cfg_max_filesize=$2; shift;; + (-A|--album-name) album_name=$2; shift;; + (-t|--tags) tags=$2; shift;; - -i|--my-ip) action='getmyip';; - -u|--shorten) action='url';; + (--tmp-dir) cfg_tmp_dir=$2; shift;; + (--url) cfg_service_url=$2; shift;; + (--screenshot-ext) cfg_screenshot_ext=$2; shift;; + (--max-filesize) cfg_max_filesize=$2; shift;; - -p|--public) flag_private='false';; - -R|--remove-file) flag_rm='1';; - -s|--screenshot) flag_scn='1';; - -S|--short-url) flag_shortlink=1;; - -P|--page-url) flag_directlink=0;; - -q|--quiet) flag_quiet=1;; - -v|--void) flag_void=1;; + (-i|--my-ip) action='getmyip';; + (-u|--shorten) action='url';; - --notify) flag_notify=1;; - --no-notify|-n) flag_notify=0;; + (-p|--public) flag_private='false';; + (-R|--remove-file) flag_rm='1';; + (-s|--screenshot) flag_scn='1';; + (-S|--short-url) flag_shortlink=1;; + (-P|--page-url) flag_directlink=0;; + (-q|--quiet) flag_quiet=1;; + (-v|--void) flag_void=1;; - -F|--fullscreen) + (--notify) flag_notify=1;; + (--no-notify|-n) flag_notify=0;; + + (-F|--fullscreen) flag_scn='1' flag_scn_fullscreen='1' ;; - -a|--album-id) + (-a|--album-id) misc_curl_args+=( -F "album_id=$2" ) shift ;; - -d|--description) + (-d|--description) misc_curl_args+=( -F "description=$2" ) shift ;;