initialization

This commit is contained in:
Reindl David (IT-PTR-CEN2-SL10) committed 2026-10-07 01:16:57 +02:00
commit 9ff09693ed
92 files changed
+46209

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
#!/bin/bash
# Password Generator Package Creator
# Creates a distributable archive of the complete i18n-enabled password generator
echo "📦 Creating Password Generator Distribution Package"
echo "================================================="
# Get version from environment or use default
VERSION=${1:-"2.0.0-i18n"}
PACKAGE_NAME="password-generator-${VERSION}"
# Create temporary directory structure
echo "📁 Preparing package structure..."
rm -rf dist/
mkdir -p dist/${PACKAGE_NAME}
# Copy all necessary files
cp -r config/ dist/${PACKAGE_NAME}/
cp -r src/ dist/${PACKAGE_NAME}/
cp -r templates/ dist/${PACKAGE_NAME}/
cp -r assets/ dist/${PACKAGE_NAME}/
cp -r locales/ dist/${PACKAGE_NAME}/
cp -r public/ dist/${PACKAGE_NAME}/
# Copy configuration and documentation
cp composer.json dist/${PACKAGE_NAME}/
cp .env dist/${PACKAGE_NAME}/.env.example
cp README.md dist/${PACKAGE_NAME}/
cp DEPLOYMENT.md dist/${PACKAGE_NAME}/
cp install.sh dist/${PACKAGE_NAME}/
# Create logs directory with placeholder
mkdir -p dist/${PACKAGE_NAME}/logs
cp logs/README.md dist/${PACKAGE_NAME}/logs/
# Create archive
cd dist/
echo "🗜️ Creating ZIP archive..."
zip -r ${PACKAGE_NAME}.zip ${PACKAGE_NAME}/ -x "*.DS_Store" "*.git*" "vendor/*" "node_modules/*"
# Create tar.gz archive
echo "🗜️ Creating TAR.GZ archive..."
tar -czf ${PACKAGE_NAME}.tar.gz ${PACKAGE_NAME}/
# Calculate checksums
echo "🔐 Calculating checksums..."
sha256sum ${PACKAGE_NAME}.zip > ${PACKAGE_NAME}.zip.sha256
sha256sum ${PACKAGE_NAME}.tar.gz > ${PACKAGE_NAME}.tar.gz.sha256
cd ..
# Display results
echo ""
echo "✅ Package creation completed!"
echo ""
echo "📁 Generated files:"
ls -la dist/
echo ""
echo "📊 Package statistics:"
echo "Files: $(find dist/${PACKAGE_NAME}/ -type f | wc -l)"
echo "Directories: $(find dist/${PACKAGE_NAME}/ -type d | wc -l)"
echo "ZIP size: $(du -h dist/${PACKAGE_NAME}.zip | cut -f1)"
echo "TAR.GZ size: $(du -h dist/${PACKAGE_NAME}.tar.gz | cut -f1)"
echo ""
echo "🚀 Ready for distribution!"
echo "Share the files in dist/ directory"
echo ""
echo "📋 Installation instructions for end users:"
echo "1. Extract the archive"
echo "2. cd ${PACKAGE_NAME}/"
echo "3. chmod +x install.sh && ./install.sh"
echo "4. composer start"
echo "5. Visit: http://localhost:8080"