Skip to content

Commit

Permalink
Make mirror delete root files
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored Nov 1, 2023
1 parent 1247aac commit 9c94d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ chmod 600 tmp/server_key
echo "$SSH_KEY" > tmp/server_key
cp -r www/* repo/
log "Uploading to $SERVER..."
rsync -Pcuav --delete -e "ssh -p 22 -oStrictHostKeyChecking=no -i tmp/server_key" repo/* "$USER@$SERVER:$DIR/staging"
ssh -p 22 -oStrictHostKeyChecking=no -i tmp/server_key "$USER@$SERVER" "rsync -a --delete --link-dest='$DIR/staging' '$DIR/staging/'* '$DIR/live'"
rsync -Pcuav --delete -e "ssh -p 22 -oStrictHostKeyChecking=no -i tmp/server_key" repo/. "$USER@$SERVER:$DIR/staging"
ssh -p 22 -oStrictHostKeyChecking=no -i tmp/server_key "$USER@$SERVER" "rsync -a --delete --link-dest='$DIR/staging' '$DIR/staging/.' '$DIR/live'"
rm tmp/server_key

0 comments on commit 9c94d62

Please sign in to comment.