From: hayao Date: Wed, 5 May 2021 07:24:57 +0000 (+0900) Subject: [update] : Added --bakdir X-Git-Tag: v1.8~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=08d211697b472532b5049724fa2276bb2590be03;hp=27247f878be0fb936ea8c5484c92b32dc4a1d8d5;p=alterlinux%2Ffascode-live-tools.git [update] : Added --bakdir --- diff --git a/fascode-gtk-bookmarks/fascode-gtk-bookmarks b/fascode-gtk-bookmarks/fascode-gtk-bookmarks index 9420764..67c4332 100755 --- a/fascode-gtk-bookmarks/fascode-gtk-bookmarks +++ b/fascode-gtk-bookmarks/fascode-gtk-bookmarks @@ -32,10 +32,11 @@ _help() { echo " -f | --force Force overwriting" echo " -s | --simulation Enable simulation" echo " -h | --help This help message and exit" + echo " --bakdir [dir] Specify the directory used for backup and restore" echo echo " General command:" - echo " add Add a item to the sidebar" - echo " delete Delete item from the sidebar" + echo " add ... Add a item to the sidebar" + echo " delete ... Delete item from the sidebar" echo " alldelete Delete all sidebar items" echo " init Initializes the sidebar" echo " backup Backup sidebar" @@ -256,7 +257,7 @@ restore(){ # Argument analysis and processing ARGUMENT=("${@}") OPTS=("f" "h" "s") -OPTL="force,help,fascodelive,t-mart,takebayashi,simulation,alterlive" +OPTL="force,help,fascodelive,t-mart,takebayashi,simulation,alterlive,bakdir:" if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}"); then exit 1 fi @@ -284,17 +285,17 @@ while true; do fascodelive=true shift 1 ;; - --t-mart) + --t-mart) echo "さすが店長、青春ブタ野郎だね" shift 1 exit 0 ;; - --takebayashi) + --takebayashi) echo "竹林さん。チノちゃんかわいい最高!!" shift 1 exit 0 ;; - -t) + -t) if [[ "$(basename $0)" == "alterlinux-gtk-bookmarks" ]]; then echo "さすが店長、青春ブタ野郎だね" else @@ -303,6 +304,10 @@ while true; do shift 1 exit 0 ;; + --bakdir) + backup_dir="${2}" + shift 2 + ;; --) shift break