diff --git a/scripts/local-remote.sh b/scripts/local-remote.sh index 98efdbc..d49e5bc 100644 --- a/scripts/local-remote.sh +++ b/scripts/local-remote.sh @@ -1,5 +1,3 @@ -REMOTE_PROGRESS=".remote-in-progress" - if [ -f $REMOTE_PROGRESS ]; then echo "Waiting for remote-local.sh to finish..." exit 0 @@ -38,4 +36,5 @@ sshpass -p "${SERVER_PASSWORD}" \ --exclude watch-build.sh \ --exclude sftp-watch.sh \ --exclude split-conflicts.sh \ + --exclude $REMOTE_PROGRESS \ -e ssh . "${SERVER_USER}@${SERVER_HOST}:${SERVER_PATH}" diff --git a/scripts/remote-local.sh b/scripts/remote-local.sh index 19665cb..6cead6b 100644 --- a/scripts/remote-local.sh +++ b/scripts/remote-local.sh @@ -1,5 +1,3 @@ -REMOTE_PROGRESS=".remote-in-progress" - touch $REMOTE_PROGRESS sshpass -p "${SERVER_PASSWORD}" \ @@ -28,6 +26,7 @@ sshpass -p "${SERVER_PASSWORD}" \ --exclude watch-build.sh \ --exclude sftp-watch.sh \ --exclude split-conflicts.sh \ + --exclude $REMOTE_PROGRESS \ -e ssh "${SERVER_USER}@${SERVER_HOST}:${SERVER_PATH}" . \ $1 diff --git a/scripts/watch-build.sh b/scripts/watch-build.sh index 79d0c39..6c68293 100644 --- a/scripts/watch-build.sh +++ b/scripts/watch-build.sh @@ -1,7 +1,6 @@ #!/bin/bash CACHE_FILE=".build-cache" -REMOTE_PROGRESS=".remote-in-progress" needs_build() { # If cache file doesn't exist, require build diff --git a/sync-project.sh b/sync-project.sh index 057ead4..bc673f1 100755 --- a/sync-project.sh +++ b/sync-project.sh @@ -153,9 +153,11 @@ echo -e "${GREEN}.vscode/sftp.json created successfully${NC}" # Go through scripts, add variables and add them to project folder if [ "$SFTP_ONLY" = true ]; then + # Sftp only scripts scripts=("local-remote.sh" "remote-local.sh" "sftp-watch.sh" "ssh.sh") else - scripts=("watch-build.sh" "local-remote.sh" "remote-local.sh" "sftp-watch.sh" "ssh.sh") + # All scripts + scripts=("watch-build.sh" "local-remote.sh" "remote-local.sh" "sftp-watch.sh" "ssh.sh" "split-conflicts.sh") fi for script in "${scripts[@]}"; do @@ -169,6 +171,7 @@ for script in "${scripts[@]}"; do SERVER_HOST=\"${HOST}\" SERVER_PASSWORD=\"${SSH_PASSWORD}\" SERVER_PATH=\"${SERVER_PROJECT_PATH}/\" + REMOTE_PROGRESS=\".remote-in-progress\" " > "${script}" # Append the rest of the upload core build script