Commit d2856752 authored by Miloš Diviš's avatar Miloš Diviš
Browse files

Forgoten debug PWD deleted, fixed behaviour handling wrong switches

parent 70998f34
......@@ -25,12 +25,12 @@ function downloadIndex {
}
function displayHelp {
pwd
echo 'Deploy script for Nette application'
echo '-----------------------------------'
echo '-d to delete remote logs and exceptions'
echo '--delete-cache deletes temp/cache contents WITHOUT DEPLOY'
echo '--toggle-maintenance turns on/off maintenance mode on remote server WITHOUT DEPLOY'
echo -e '-h or --help\t\t display this help'
echo -e '-d\t\t\t delete remote logs and exceptions'
echo -e '--delete-cache\t\t deletes temp/cache contents WITHOUT DEPLOY'
echo -e '--toggle-maintenance\t turns on/off maintenance mode on remote server WITHOUT DEPLOY'
}
function toggleMaintenance {
......@@ -59,8 +59,8 @@ function toggleMaintenance {
# check options
delete_logs=0
while getopts ":dh-:" opt; do
case $opt in
while getopts ":dh-:" OPT; do
case $OPT in
d)
delete_logs=1
;;
......@@ -87,8 +87,20 @@ while getopts ":dh-:" opt; do
"help"*)
displayHelp
exit 0
;;
?*)
echo "!!! Wrong argument, stopping process"
echo
displayHelp
exit 1
;;
esac
;;
?)
echo "!!! Wrong argument, stopping process"
echo
displayHelp
exit 1
;;
esac
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment