Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 61 additions & 28 deletions bin/start.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash
echo "Welcome To Noctura!"
tput setaf 33; echo "Welcome To Noctura!"; tput sgr0

#Navigating to the project root
scriptDir="${0%/*}"
cd $scriptDir
cd ../
echo "Project Directory: $(pwd)"

tput bold; echo "Dev build is currently still being working on, choose at your own risk"; tput sgr0

while [[ $devAns != "dev" ]] || [[ $devAns != "prod" ]]
do
echo "Dev or Prod? dev/prod"
Expand All @@ -15,7 +17,7 @@ do
then
break
else
echo "Invalid Input"
tput setaf 124; echo "Invalid Input"; tput sgr0
fi
done

Expand All @@ -32,7 +34,7 @@ then
then
break
else
echo "Invalid Input"
tput setaf 124; echo "Invalid Input"; tput sgr0
fi
done

Expand All @@ -58,7 +60,7 @@ else
then
break
else
echo "Invalid Input"
tput setaf 124; echo "Invalid Input"; tput sgr0
fi
done

Expand All @@ -72,31 +74,62 @@ else
fi
fi

while [[ $buildAns != "build" ]] || [[ $buildAns != "start" ]] || [[ $buildAns != "both" ]]
do
echo "Would you like to build, start, or both? build/start/both"
read buildAns
if [[ $buildAns == "build" ]] || [[ $buildAns == "start" ]] || [[ $buildAns == "both" ]]
if [[ $devAns == "dev" ]]
then
while [[ $buildAns != "y" ]] || [[ $buildAns != "n" ]]
do
echo "Would you like to build and start? y/n"
read buildAns
if [[ $buildAns == "y" ]] || [[ $buildAns == "n" ]]
then
break
else
tput setaf 124; echo "Invalid Input"; tput sgr0
fi
done

if [[ $buildAns == 'y' ]]
then
break
else
echo "Invalid Input"
echo "Running Dynamic"
npm run build:dev
elif [[ $buildAns == 'n' ]]
then
tput setaf 124; echo "Exiting Dynamic"; tpur sgr0
fi
done

if [[ $buildAns == "build" ]]
then
echo "Building Dynamic"
npm run build:$devAns
elif [[ $buildAns == "start" ]]
then
echo "Starting Dynamic"
npm run start
elif [[ $buildAns == "both" ]]
elif [[ $devAns == "prod" ]]
then
echo "Doing Both!"
echo "Building Dynamic"
npm run build:$devAns
echo "Starting Dynamic :)"
npm run start
fi

while [[ $buildAns != "build" ]] || [[ $buildAns != "start" ]] || [[ $buildAns != "both" ]]
do
tput sitm; echo "Hint: ctrl + c to exit"; tput sgr0
echo "Would you like to build, start, or both? build/start/both"
read buildAns
if [[ $buildAns == "build" ]] || [[ $buildAns == "start" ]] || [[ $buildAns == "both" ]]
then
break
else
tput setaf 124; echo "Invalid Input"; tput sgr0
fi
done

if [[ $buildAns == "build" ]]
then
echo "Building Dynamic"
npm run build:$devAns
elif [[ $buildAns == "start" ]]
then
echo "Starting Dynamic"
npm run start
elif [[ $buildAns == "both" ]]
then
echo "Doing Both!"
echo "Building Dynamic"
npm run build:$devAns
echo "Starting Dynamic :)"
npm run start
fi
fi