This commit is contained in:
Alex 2024-12-12 17:15:47 -04:00
parent b8916efcfc
commit 07a98a9c62

View File

@ -170,16 +170,16 @@ spirilink-software:
# Set up web app service
.PHONY: setup-webapp-service
setup-webapp-service:
@echo "\nSetting up web app service..."
@if [ -d ~/tmp/spiri-base ]; then \
cd ~/tmp/spiri-base && git pull || (echo "Error updating repository. Check network and repository access." && exit 1); \
@echo "Setting up web app service..."
@if [ -d ~/spiri-base ]; then \
cd ~/spiri-base && git pull || (echo "Error updating repository. Check network and repository access." && exit 1); \
else \
git clone https://git.spirirobotics.com/aepko/Spiri-Base.git ~/tmp/spiri-base || (echo "Error cloning repository. Check network and repository access." && exit 1); \
cd ~/tmp/spiri-base && git sparse-checkout init --cone && git sparse-checkout set .output; \
git clone https://git.spirirobotics.com/aepko/Spiri-Base.git ~/spiri-base || (echo "Error cloning repository. Check network and repository access." && exit 1); \
cd ~/spiri-base && git sparse-checkout init --cone && git sparse-checkout set .output; \
fi;
@if [ -d ~/tmp/spiri-base/.output ]; then \
@if [ -d ~/spiri-base/.output ]; then \
$(SUDO) mkdir -p /var/www/webapp; \
$(SUDO) cp -r ~/tmp/spiri-base/.output/* /var/www/webapp/; \
$(SUDO) cp -r ~/spiri-base/.output/* /var/www/webapp/; \
else \
echo "Error: .output folder not found. Ensure the repository contains the necessary files."; \
exit 1; \