aboutsummaryrefslogtreecommitdiffstats
path: root/bitpocket
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
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')
-rwxr-xr-xbitpocket6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitpocket b/bitpocket
index f1df649..e6d159f 100755
--- a/bitpocket
+++ b/bitpocket
@@ -137,7 +137,7 @@ function sync {
echo "# Saving current state and backing up files (if needed)"
echo " | Root dir: $(pwd)"
rsync -av --list-only --exclude "/$DOT_DIR" $RSYNC_OPTS $USER_RULES . | grep "^-\|^d" \
- | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.::" | sort > "$STATE_DIR/tree-current"
+ | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.$::" | sort > "$STATE_DIR/tree-current"
# Prevent bringing back locally deleted files or removing new local files
cp -f "$STATE_DIR/added-prev" "$TMP_DIR/fetch-exclude"
@@ -186,7 +186,7 @@ function sync {
echo
echo "# Saving after-sync state and cleaning up"
rsync -av --list-only --exclude "/$DOT_DIR" $USER_RULES . | grep "^-\|^d" \
- | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.::" | sort > "$TMP_DIR/tree-after"
+ | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.$::" | sort > "$TMP_DIR/tree-after"
# Save all newly created files for next run (to prevent deletion of them)
@@ -363,7 +363,7 @@ function die {
function list {
echo -e "\x1b\x5b1;32mbitpocket\x1b\x5b0m will sync the following files:"
rsync -av --list-only --exclude "/$DOT_DIR" $USER_RULES . | grep "^-\|^d" \
- | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.::" | sort
+ | sed "s:^\S*\s*\S*\s*\S*\s*\S*\s*:/:" | sed "s:^/\.$::" | sort
}
function usage {

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