Do not allow local remote sync while remote local is in progress
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
REMOTE_PROGRESS=".remote-in-progress"
|
||||||
|
|
||||||
|
if [ -f $REMOTE_PROGRESS ]; then
|
||||||
|
echo "Waiting for remote-local.sh to finish..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
sshpass -p "${SERVER_PASSWORD}" \
|
sshpass -p "${SERVER_PASSWORD}" \
|
||||||
rsync -avzu --delete \
|
rsync -avzu --delete \
|
||||||
`# Version control and editor files` \
|
`# Version control and editor files` \
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
REMOTE_PROGRESS=".remote-in-progress"
|
||||||
|
|
||||||
|
touch $REMOTE_PROGRESS
|
||||||
|
|
||||||
sshpass -p "${SERVER_PASSWORD}" \
|
sshpass -p "${SERVER_PASSWORD}" \
|
||||||
rsync -avzu \
|
rsync -avzu \
|
||||||
`# Version control and editor files` \
|
`# Version control and editor files` \
|
||||||
@@ -26,3 +30,5 @@ sshpass -p "${SERVER_PASSWORD}" \
|
|||||||
--exclude split-conflicts.sh \
|
--exclude split-conflicts.sh \
|
||||||
-e ssh "${SERVER_USER}@${SERVER_HOST}:${SERVER_PATH}" . \
|
-e ssh "${SERVER_USER}@${SERVER_HOST}:${SERVER_PATH}" . \
|
||||||
$1
|
$1
|
||||||
|
|
||||||
|
rm $REMOTE_PROGRESS
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CACHE_FILE=".build-cache"
|
CACHE_FILE=".build-cache"
|
||||||
|
REMOTE_PROGRESS=".remote-in-progress"
|
||||||
|
|
||||||
needs_build() {
|
needs_build() {
|
||||||
# If cache file doesn't exist, require build
|
# If cache file doesn't exist, require build
|
||||||
@@ -45,6 +46,11 @@ upload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" = "--upload" ]; then
|
if [ "$1" = "--upload" ]; then
|
||||||
|
if [ -f $REMOTE_PROGRESS ]; then
|
||||||
|
echo "Waiting for remote-local.sh to finish..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
upload
|
upload
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user