Commit 748c1a1d authored by Rafael De Lima Prado's avatar Rafael De Lima Prado
Browse files

database: Remove importing dblink.sql


Signed-off-by: Rafael De Lima Prado's avatarRafael de Lima Prado <rlp09@inf.ufpr.br>
parent de31d014
......@@ -19,21 +19,28 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
export DB_NAME=$1
DB_LINK_LOCATION=/usr/share/postgresql/8.4/contrib/dblink.sql
DB_NAME=$1
# checking parameters
if [[ -z $DB_NAME ]]; then
echo "usage: $0 [database_name]"
exit 1
print_help() {
echo -e ""
echo -e "usage: $0 database_name [-d]"
echo -e ""
echo -e " Options:"
echo -e " -d Run datawarehouse scripts after creation of tables."
echo -e ""
}
if [[ $1 != "-"* && $# != "0" ]]; then
DB_NAME=$1
shift
else
print_help
exit 1
fi
# creating db
createdb $DB_NAME
# importing db_link functions
psql $DB_NAME -f $DB_LINK_LOCATION
# creating database tables and structure
for file in $(ls -B create/); do
psql $DB_NAME -f create/$file
......@@ -56,3 +63,4 @@ done
# installing crontab
./cron.sh
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