mirror of
https://github.com/notwa/rc
synced 2024-10-31 16:54:35 -07:00
11 lines
267 B
Bash
Executable file
11 lines
267 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
autosync() {
|
|
target="$1"
|
|
shift
|
|
# as a reminder not to get the argument order mixed up:
|
|
echo -E "rsyncing to $target" >&2
|
|
while inotifywait -q -e create,modify "$@"; do
|
|
\rsync -rtl "$@" "$target"
|
|
done
|
|
}
|
|
autosync "$@"
|