Compare commits

...

2 Commits

2 changed files with 17 additions and 1 deletions

View File

@@ -46,7 +46,15 @@ all: build deploy
@echo "✓ Build and deployment complete!"
clean:
@echo "Removing build artifacts..."
@echo "Cleaning build artifacts..."
@if [ -d "$(SCRIPT_DIR)/build/rootfs" ]; then \
echo "Unmounting any stray mounts from $(SCRIPT_DIR)/build/rootfs..."; \
mount | grep "$(SCRIPT_DIR)/build/rootfs" | awk '{print $$3}' | while read mount; do \
echo " Unmounting $$mount"; \
sudo umount -l "$$mount" 2>/dev/null || true; \
done; \
fi
@echo "Removing build directories..."
sudo rm -rf $(SCRIPT_DIR)/build/rootfs
sudo rm -rf $(SCRIPT_DIR)/images
@echo "✓ Cleaned!"

View File

@@ -251,5 +251,13 @@ echo "Deploying to HTTP directory..."
rsync -av $IMAGE_DIR/$VERSION/ $HTTP_DIR/
ln -sfn $VERSION $HTTP_DIR/latest
# Fix permissions for web server access
echo "Setting permissions for HTTP serving..."
chmod 644 $HTTP_DIR/vmlinuz
chmod 644 $HTTP_DIR/initrd-netboot.img
chmod 644 $HTTP_DIR/filesystem.squashfs
chmod 644 $HTTP_DIR/version.txt
echo "Build complete! Version: $VERSION"
echo "Files available at: $HTTP_DIR/"
ls -lh $HTTP_DIR/vmlinuz $HTTP_DIR/initrd-netboot.img $HTTP_DIR/filesystem.squashfs