Sindbad~EG File Manager
#!/bin/bash
# Configuration
LOCAL_DIR="/Users/beeson/Dropbox/Sites/WebMathXpert"
REMOTE_USER="beeson"
REMOTE_HOST="208.69.40.113"
REMOTE_PORT="2222"
REMOTE_DIR="public_html/WebMathXpert"
LOG_FILE="$LOCAL_DIR/deployWebMathXpert.log"
# Ensure log file exists
touch "$LOG_FILE"
# Start logging
echo "Deploying WebMathXpert files on $(date)" | tee -a "$LOG_FILE"
# Rsync options (Fixed SSH syntax)
RSYNC_OPTS=(-avz --update --progress -e "ssh -p $REMOTE_PORT")
# Upload main files: *.svg, *.php, *.js, *.mp4, *.mp3 (excluding images directory)
echo "Uploading main files..." | tee -a "$LOG_FILE"
rsync "${RSYNC_OPTS[@]}" --include="*.svg" --include="*.php" --include="*.js" \
--include="*.mp4" --include="*.mp3" --exclude="images/" \
--exclude="ThreeBodyWeb/" \
"$LOCAL_DIR/" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/" \
| tee -a "$LOG_FILE"
# Upload images/*.png specifically to the images subdirectory
echo "Uploading images..." | tee -a "$LOG_FILE"
rsync "${RSYNC_OPTS[@]}" --include="*.png" --exclude="*" "$LOCAL_DIR/images/" \
"$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/images/" \
| tee -a "$LOG_FILE"
echo "Deployment completed on $(date)" | tee -a "$LOG_FILE"
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists