Files
cutThink_lite/scripts/package-frontend.sh

37 lines
800 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Package frontend only for testing
set -e
echo "Packaging CutThenThink Lite (Frontend Only)..."
# Build frontend
echo "Building frontend..."
npm run build
# Create package directory
PACKAGE_DIR="cutthink-lite-frontend"
rm -rf "$PACKAGE_DIR"
mkdir -p "$PACKAGE_DIR"
# Copy built files
cp -r dist/* "$PACKAGE_DIR/"
# Create archive
echo "Creating archive..."
tar -czf "${PACKAGE_DIR}.tar.gz" "$PACKAGE_DIR"
if command -v zip &> /dev/null; then
zip -rq "${PACKAGE_DIR}.zip" "$PACKAGE_DIR"
echo "Package created:"
echo " - ${PACKAGE_DIR}.tar.gz"
echo " - ${PACKAGE_DIR}.zip"
else
echo "Package created:"
echo " - ${PACKAGE_DIR}.tar.gz"
echo " (zip not available, install with: sudo apt-get install zip)"
fi
# Cleanup
rm -rf "$PACKAGE_DIR"
echo "Done!"