ku1ik/bitpocket

[Request] Sync multiple directories with one command

firecat53 opened this issue · 1 comments

Nice little script! Wonder if it'd be useful for anyone to be able to sync multiple directories with one command. Perhaps an env variable like BITPOCKET_DIRS = ("/docs" "/music" "~/.config") or something similar.

Thanks!
Scott

Hey Scott,

bitpocket is actually built to be run from the directory you want to sync. There are 2 possible solutions for your case.

  • have 3 separate bitpocket dirs ("/docs" "/music" "~/.config"), in each of them run bitpocket init REMOTE, then create shell script like this:

    #!/bin/sh
    cd ~/docs && bitpocket sync
    cd ~/music && bitpocket sync
    cd ~/.config && bitpocket sync
    
  • create ~/BitPocket directory, init with some remote, and symlink all above directories inside of it. You would need to add/uncomment RSYNC_OPTS setting (63b8392) in .bitpocket/config