scripts/sync: dont sync PKM to self
This commit is contained in:
@@ -40,7 +40,9 @@ homeMountFor() {
|
||||
sync_pkm() {
|
||||
local host=$1
|
||||
local me=$(hostname)
|
||||
ssh "$host" "set -eux; remote=$me; "'cd ~/knowledge; old=$(git rev-parse --abbrev-ref HEAD); [ "$old" = master ]; st=$(git stash create); git reset --hard HEAD; git branch -D sync || true; git checkout -b sync; git fetch $remote master && git rebase $remote/master && (if [ -n "$st" ]; then git stash apply "$st"; fi) && git branch --move --force master || (git --reset-hard HEAD; git checkout "$old"; (if [ -n "$st" ]; then git stash apply "$st"; fi); false)'
|
||||
if [ "$host" != "$me" ]; then
|
||||
ssh "$host" "set -eux; remote=$me; "'cd ~/knowledge; old=$(git rev-parse --abbrev-ref HEAD); [ "$old" = master ]; st=$(git stash create); git reset --hard HEAD; git branch -D sync || true; git checkout -b sync; git fetch $remote master && git rebase $remote/master && (if [ -n "$st" ]; then git stash apply "$st"; fi) && git branch --move --force master || (git --reset-hard HEAD; git checkout "$old"; (if [ -n "$st" ]; then git stash apply "$st"; fi); false)'
|
||||
fi
|
||||
}
|
||||
|
||||
sync_music() {
|
||||
|
Reference in New Issue
Block a user