nelle-observer/build.sh
2024-09-15 20:12:10 -06:00

38 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
read -p "build the frontend? Yes(y) / No(n) / Cancel(c):- " choice
if [ "$choice" = "y" ]; then
echo "building static site!"
pnpm i
pnpm run build
read -p "build the backend? Yes(y) / No(n) / Cancel(c):- " choice
if [ "$choice" = "y" ]; then
echo "building backend!"
cd backend
./gradlew shadowJar
systemctl restart nelle-observer-api
elif [ "$choice" = "n" ]; then
echo "exiting..."
elif [ "$choice" = "c" ]; then
echo "build cancelled"
else
echo "no choice given, exiting..."
fi
elif [ "$choice" = "n" ]; then
read -p "build the backend? Yes(y) / No(n) / Cancel(c):- " choice
if [ "$choice" = "y" ]; then
echo "building backend!"
cd backend
./gradlew shadowJar
systemctl restart nelle-observer-api
elif [ "$choice" = "n" ]; then
echo "exiting..."
elif [ "$choice" = "c" ]; then
echo "build cancelled"
else
echo "no choice given, exiting..."
fi
elif [ "$choice" = "c" ]; then
echo "Installation cancelled"
else
echo "No Choice given, exiting..."
fi