- destdir=$UPLOAD_DAILY_ROOT/$DAILY
- echo "Copying to the starship at $destdir..."
- ssh $UPLOAD_HOST "mkdir -p $destdir"
- scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
- ssh $UPLOAD_HOST "cd $destdir && ls -al"
-
+ destdir=$UPLOAD_PREVIEW_ROOT/$DAILY
+ echo "Copying to $UPLOAD_HOST at $destdir..."
+ if [ $UPLOAD_METHOD = ssh ]; then
+ ssh $UPLOAD_HOST "mkdir -p $destdir"
+ scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
+ fi
+ if [ $UPLOAD_METHOD = ftp ]; then
+ lftp -c "open $UPLOAD_HOST; mkdir $destdir"
+ lftp -c "open $UPLOAD_HOST; cd $destdir; mput $STAGING_DIR/*"
+ fi