Share lock with getdot
This commit is contained in:
parent
cb2185ab3e
commit
82e05fc333
|
@ -203,8 +203,7 @@ function load-extensions {
|
|||
done
|
||||
}
|
||||
|
||||
function pushdot {
|
||||
cd "$DOT_DIR" || return 1
|
||||
function dot-lock-wait {
|
||||
if test -f "$SYNC_LOCK_FILE"; then
|
||||
echo "Sync lockfile present at '$SYNC_LOCK_FILE'"
|
||||
echo "Waiting for ongoing sync to finish"
|
||||
|
@ -215,7 +214,12 @@ function pushdot {
|
|||
fi
|
||||
done
|
||||
fi
|
||||
touch "$SYNC_LOCK_FILE"
|
||||
}
|
||||
|
||||
function pushdot {
|
||||
cd "$DOT_DIR" || return 1
|
||||
dot-lock-wait
|
||||
echo "$$" > "$SYNC_LOCK_FILE"
|
||||
local res
|
||||
if ! git diff --quiet; then
|
||||
if [ $# -eq 0 ]; then
|
||||
|
@ -264,6 +268,7 @@ function getdot {
|
|||
echo "An alias for scpace has not been defined on this device!"
|
||||
return 1
|
||||
fi
|
||||
dot-lock-wait
|
||||
cd "$DOT_DIR" || return 1
|
||||
git pull && ./copy.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue