Mercurial > hg > config
annotate bin/quicksilver.sh @ 915:0bb00763f6d2
update distribute for modern python packaging
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 27 May 2024 16:44:09 -0700 |
parents | 107bf2430602 |
children |
rev | line source |
---|---|
911
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
1 #!/usr/bin/env bash |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
2 |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
3 # Alternative to silvermirror + unison |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
4 |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
5 set -euxo pipefail |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
6 |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
7 # https://stackoverflow.com/questions/1602324/how-do-i-synchronize-in-both-directions |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
8 # https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
9 |
913
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
10 # TODO: loop over directories? |
911
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
11 SRC="${HOME}/docs" |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
12 |
913
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
13 # TODO?: add -zP flags; from |
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
14 # https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories |
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
15 # If you’re transferring files that have not already been compressed, like text files, you can reduce the network transfer by adding compression with the -z option: |
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
16 # The -P flag is also helpful. It combines the flags --progress and --partial. This first flag provides a progress bar for the transfers, and the second flag allows you to resume interrupted transfers: |
107bf2430602
update with future work + links
Jeff Hammel <k0scist@gmail.com>
parents:
911
diff
changeset
|
17 |
911
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
18 mkdir -p "${SRC}" |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
19 rsync -au k0s.org:"${SRC}"/ "${SRC}" |
6fbbe5f0bc6b
add silvermirror/unison alternative
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
20 rsync -au "${SRC}"/ k0s.org:"${SRC}" |