Add .keep files for src directories; make sure they don't get pushed to build env
[CDN/Mosi.git] / script / push
1 #!/bin/sh
2
3 cd "$(dirname "$(dirname "${0}")")"
4
5 filter="$(mktemp filter.XXXXXXXX)"
6 trap "rm -f '${filter}'" exit hup int term kill
7 cat <<EOF > "${filter}"
8 - /${filter}
9 - /.git/
10 - /src/conf/*/
11 - /src/conf/*.cpio.gz
12 + /src/conf/*.md_size
13 - /src/pkg/
14 - /src/root/
15 - /tree/
16 - /src/*/.keep
17
18 + /**
19 EOF
20
21 rsync --archive --delete --filter=". ${filter}" --hard-links --progress --sparse --stats --verbose ./ cyberleo@ss4200:world/