test for argument; bug fix
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/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 )"
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user