33 lines
928 B
Bash
Executable File
33 lines
928 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set source and destination paths
|
|
SRC_UTILS="../dev.helpdeskplus.ca-main/app/Utilities"
|
|
DEST_UTILS="./app/Utils"
|
|
SRC_TEMPLATES="../dev.helpdeskplus.ca-main/resources/templates/emails"
|
|
DEST_TEMPLATES="./resources/templates/emails"
|
|
|
|
# Create destination folders if they don't exist
|
|
mkdir -p "$DEST_UTILS"
|
|
mkdir -p "$DEST_TEMPLATES"
|
|
|
|
echo "🔁 Copying utility files..."
|
|
|
|
# List of utility files to copy and update namespaces in
|
|
FILES=("EmailUtility.php" "TemplateUtility.php" "QueueUtility.php")
|
|
|
|
for FILE in "${FILES[@]}"; do
|
|
if [ -f "$SRC_UTILS/$FILE" ]; then
|
|
echo " 📁 $FILE -> $DEST_UTILS"
|
|
sed 's|App\\Utilities|WizdomNetworks\\WizeWeb\\Utilities|g' "$SRC_UTILS/$FILE" > "$DEST_UTILS/$FILE"
|
|
else
|
|
echo " ⚠️ $FILE not found in $SRC_UTILS"
|
|
fi
|
|
done
|
|
|
|
echo "📄 Copying email templates..."
|
|
|
|
cp -r "$SRC_TEMPLATES"/* "$DEST_TEMPLATES"/
|
|
|
|
echo "✅ Done. All utilities and templates copied."
|
|
|