aboutsummaryrefslogtreecommitdiffstats
path: root/bitpocket_mac
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2017-03-08 09:53:05 +0100
committerDaniel Lange <DLange@git.local>2017-03-08 11:12:49 +0100
commit1141563f92614564100b36b5c1a7ae71343cfebe (patch)
tree817e6774bc4d84688583e5e699ed2f5648e15e1a /bitpocket_mac
parentc3df0643f56b8e1ce2a815ecda82a374ed394547 (diff)
downloadbitpocket-1141563f92614564100b36b5c1a7ae71343cfebe.tar.gz
bitpocket-1141563f92614564100b36b5c1a7ae71343cfebe.tar.bz2
bitpocket-1141563f92614564100b36b5c1a7ae71343cfebe.zip
Port Github PR #54 from sickill/bitpocket
Fix syncing files whose names start with . (dot).
Diffstat (limited to 'bitpocket_mac')
-rwxr-xr-xbitpocket_mac6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitpocket_mac b/bitpocket_mac
index 0101766..b3fc6e8 100755
--- a/bitpocket_mac
+++ b/bitpocket_mac
@@ -139,7 +139,7 @@ function sync {
echo "# Saving current state and backing up files (if needed)"
echo " | Root dir: $(gpwd)"
/usr/local/bin/rsync -av --list-only --exclude "/$DOT_DIR" $RSYNC_OPTS $USER_RULES . | grep "^-\|^d" \
- | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.::" | gsort > "$STATE_DIR/tree-current"
+ | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.$::" | gsort > "$STATE_DIR/tree-current"
# Prevent bringing back locally deleted files or removing new local files
gcp -f "$STATE_DIR/added-prev" "$TMP_DIR/fetch-exclude"
@@ -188,7 +188,7 @@ function sync {
echo
echo "# Saving after-sync state and cleaning up"
/usr/local/bin/rsync -av --list-only --exclude "/$DOT_DIR" $USER_RULES . | grep "^-\|^d" \
- | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.::" | gsort > "$TMP_DIR/tree-after"
+ | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.$::" | gsort > "$TMP_DIR/tree-after"
# Save all newly created files for next run (to prevent deletion of them)
@@ -365,7 +365,7 @@ function die {
function list {
echo -e "\x1b\x5b1;32mbitpocket\x1b\x5b0m will sync the following files:"
/usr/local/bin/rsync -av --list-only --exclude "/$DOT_DIR" $USER_RULES . | grep "^-\|^d" \
- | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.::" | gsort
+ | gsed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | gsed "s:^/\.$::" | gsort
}
function usage {

© 2014-2024 Faster IT GmbH | imprint | privacy policy