reinit-psql.sh: fix no arg check

This commit is contained in:
Jérôme Schneider 2014-04-08 18:29:33 +02:00
parent 0e2bd5383b
commit 9a30dadca3
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ if [ $# -gt 1 ]; then
exit 1
fi
if [ $# ]; then
if [ $# -gt 0 ]; then
if [ "$1" != "new" -a "$1" != "dl" ]; then
echo $HELP
exit 1
@ -18,7 +18,7 @@ fi
sudo -u postgres dropdb calebasse
sudo -u postgres createdb calebasse -O $USER
if [ $# ]; then
if [ $# -gt 0 ]; then
if [ $1 = "new" ]; then
ssh calebasse.aps42.entrouvert.com ssh prod "/etc/cron.daily/calebasse_dumpdb"
fi