script/gentree: clean up custom config applicator to ignore missing cpios
[CDN/Mosi.git] / script / push
1 #!/bin/sh
2
3 target="${1:-cyberleo@akisha:world/}"
4
5 cd "$(dirname "$(dirname "${0}")")"
6
7 filter="$(mktemp filter.XXXXXXXX)"
8 trap "rm -f '${filter}'" exit hup int term kill
9 cat <<EOF > "${filter}"
10 - /${filter}
11 - /.git/
12 - /src/backup/**
13 - /src/conf/*/
14 - /src/conf/*.cpio.gz
15 + /src/conf/*.md_size
16 - /src/pkg/
17 - /src/root/
18 - /tree/
19 - /src/*/.keep
20
21 + /**
22 EOF
23
24 rsync --archive --delete --filter=". ${filter}" --hard-links --progress --sparse --stats --verbose ./ "${target}"