Skip to content

Commit

Permalink
Merge pull request #14 from techstartucalgary/Aarsh/Quick-Script-Addi…
Browse files Browse the repository at this point in the history
…tion

updated script to allow for skipping of the init
  • Loading branch information
AarshShah9 authored Nov 25, 2023
2 parents 66501be + 8cc5964 commit af294a8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ backend/dist
backend/coverage
backend/coverage/*

frontend/%ProgramData%



57 changes: 35 additions & 22 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
#!/bin/bash

cd scripts || exit
# Check if --skip flag is passed
SKIP=false
for arg in "$@"
do
if [ "$arg" == "--skip" ]; then
SKIP=true
break
fi
done

# Call the installation script
./install.sh
if [ "$SKIP" = false ]; then
cd scripts || exit

# Determine the OS type and call the appropriate IP script
OS_TYPE=$(uname -s)
case "$OS_TYPE" in
Linux*|Darwin*)
# This is for Unix-like systems
./ipscriptUNIX.sh ../backend/.env
./ipscriptUNIX.sh ../frontend/.env
;;
MINGW*|CYGWIN*|MSYS*)
# This is for Windows Git Bash
./ipscript.sh ../backend/.env
./ipscript.sh ../frontend/.env
;;
*)
echo "Unknown operating system."
exit 1
;;
esac
# Call the installation script
./install.sh

cd .. || exit
# Determine the OS type and call the appropriate IP script
OS_TYPE=$(uname -s)
case "$OS_TYPE" in
Linux*|Darwin*)
# This is for Unix-like systems
./ipscriptUNIX.sh ../backend/.env
./ipscriptUNIX.sh ../frontend/.env
;;
MINGW*|CYGWIN*|MSYS*)
# This is for Windows Git Bash
./ipscript.sh ../backend/.env
./ipscript.sh ../frontend/.env
;;
*)
echo "Unknown operating system."
exit 1
;;
esac

cd .. || exit

# Use nvm to switch to the specified version of Node.js, install dependencies, and start the application
nvm use 18.13.0 || :
npm install
fi

npm run start

0 comments on commit af294a8

Please sign in to comment.