work on instalation scripts
This commit is contained in:
15
setup.sh
15
setup.sh
@@ -1,23 +1,30 @@
|
||||
#!/bin/bash
|
||||
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||
|
||||
mkdir "$parent_path"/dist
|
||||
|
||||
# Build and move the front end distribution into the output dist folder
|
||||
cd "$parent_path"/frontend
|
||||
npm install
|
||||
npm run build
|
||||
cd ../
|
||||
cp -r ./frontend/dist ./dist/frontend
|
||||
cp -rf ./frontend/dist ./dist/frontend
|
||||
|
||||
cd "$parent_path"/frontend
|
||||
# Build and move the back end distribution into the output dist folder
|
||||
cd "$parent_path"/backend
|
||||
npm install
|
||||
npm run build
|
||||
cd ../
|
||||
cp -r ./backend/dist ./dist
|
||||
cp -f ./backend/dist/* ./dist
|
||||
|
||||
|
||||
# Build and move the database into the output dist folder
|
||||
cd "$parent_path"/loader
|
||||
python3 createrushdatabase.py
|
||||
cd ../
|
||||
cp -r ./loader/testdb.db ./dist
|
||||
cp -r ./loader/testdb.db ./dist/testdb.db
|
||||
|
||||
# Move the package into the dist folder and install the needed modules
|
||||
cd "$parent_path"
|
||||
cp ./backend/package.json ./dist/package.json
|
||||
cd "$parent_path"/dist
|
||||
|
||||
Reference in New Issue
Block a user