diff --git a/qsgen2 b/qsgen2 index e430857..eab8737 100755 --- a/qsgen2 +++ b/qsgen2 @@ -88,29 +88,6 @@ _list_sites() { } -case "$1" in - add) - if [[ $# -eq 3 ]]; then - _add_site "$2" "$3" - else - echo "Usage: qsgen2 add \"Site Name\" \"/path/to/project\"" - fi - exit - ;; - list) - _list_sites - exit - ;; - force) - : >| "$blog_cache_file" # Truncate the blog cache before doing update - : >| "$pages_cache_file" # Truncate the page cache before doing update - ;; - *) - echo "Usage: qsgen2 [command]" - exit - ;; -esac - function _version() { echo "${yellow}- Created by kekePower - 2018-$(date +%Y)${end}" echo "${yellow}- https://github.com/kekePower/qsgen2/${end}" @@ -152,6 +129,29 @@ if (${debug}); then done fi +case "$1" in + add) + if [[ $# -eq 3 ]]; then + _add_site "$2" "$3" + else + echo "Usage: qsgen2 add \"Site Name\" \"/path/to/project\"" + fi + exit + ;; + list) + _list_sites + exit + ;; + force) + : >| "$blog_cache_file" # Truncate the blog cache before doing update + : >| "$pages_cache_file" # Truncate the page cache before doing update + ;; + *) + echo "Usage: qsgen2 [command]" + exit + ;; +esac + function _msg() { # Use this function to write out messages based on their type # Types are: std=green - info=yellow - debug=red other=bold_yellow