Skip to content
Snippets Groups Projects
Commit 748c1a1d authored by Rafael De Lima Prado's avatar Rafael De Lima Prado
Browse files

database: Remove importing dblink.sql

parent de31d014
No related branches found
No related tags found
No related merge requests found
......@@ -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]"
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment