diff --git a/utils/candle_info.sh b/utils/candle_info.sh index f5a2a40..36ef498 100755 --- a/utils/candle_info.sh +++ b/utils/candle_info.sh @@ -1,3 +1,8 @@ #!/bin/bash +if [[ -z $1 ]] + then + echo "please supply a database name" + exit 1 +fi SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -cat $SCRIPT_DIR/info.sql | sudo -i -u postgres psql -d $1 +cat $SCRIPT_DIR/candle_info.sql | sudo -i -u postgres psql -d $1