diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/create_db.sh | 12 | ||||
-rw-r--r-- | bin/setup_new_project.sh | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/bin/create_db.sh b/bin/create_db.sh new file mode 100644 index 0000000..0144e64 --- /dev/null +++ b/bin/create_db.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +source .env +echo "Creating db '$DATABASE_URL'" + +pg_ctl status || pg_ctl start + +{ + createdb $DATABASE_URL && echo "Database '$DATABASE_URL' created successfully" +} || { + echo "Database '$DATABASE_URL' already exists, skipping creation." +} diff --git a/bin/setup_new_project.sh b/bin/setup_new_project.sh new file mode 100644 index 0000000..bcffc7d --- /dev/null +++ b/bin/setup_new_project.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +source .env +echo "What is the name of your application?" +read appname + +echo "Where is your git repo? (eg git@github.com:dittonjs/NestStarterApp.git)" + +read reponame + +sed -i "s/USU CS4610 Nest Starter App/$appname/" README.md + +git remote rename origin upstream +git remote add origin $reponame +git branch -M main +git push -u origin main + + |