qsgen2: Move options to after reading config file
This commit is contained in:
parent
6eb642bda2
commit
954f18e0fb
46
qsgen2
46
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() {
|
function _version() {
|
||||||
echo "${yellow}- Created by kekePower - 2018-$(date +%Y)${end}"
|
echo "${yellow}- Created by kekePower - 2018-$(date +%Y)${end}"
|
||||||
echo "${yellow}- https://github.com/kekePower/qsgen2/${end}"
|
echo "${yellow}- https://github.com/kekePower/qsgen2/${end}"
|
||||||
@ -152,6 +129,29 @@ if (${debug}); then
|
|||||||
done
|
done
|
||||||
fi
|
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() {
|
function _msg() {
|
||||||
# Use this function to write out messages based on their type
|
# Use this function to write out messages based on their type
|
||||||
# Types are: std=green - info=yellow - debug=red other=bold_yellow
|
# Types are: std=green - info=yellow - debug=red other=bold_yellow
|
||||||
|
Loading…
Reference in New Issue
Block a user