cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 2390557c796dc36aa76f9a14f24304a59c3a1740
parent c9c41e4b3ccddb23214ecfd43debe60118ee7efd
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 29 May 2020 20:24:00 +0300

doc: update sample script

Diffstat:
Mdoc/rsync-repositories.txt | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/doc/rsync-repositories.txt b/doc/rsync-repositories.txt @@ -27,19 +27,15 @@ own use. HOSTNAME=rsync://carbslinux.org/repo GITDIR=/pub/git/repo SHAREDIR=/pub/share/repo - _rsync() { rsync -aC --delete --exclude=.rsync "$@" ;} git -C "$GITDIR" pull - _rsync "$GITDIR/." "$SHAREDIR" + rsync -aC --delete --include=core --exclude=.rsync \ + "$GITDIR/" "$SHAREDIR" - # For some reason the core repositories were not synced - # so I resorted to this solution - for dir in "$GITDIR/"*; do + for dir in "$SHAREDIR/"*; do [ -d "$dir" ] || continue - _rsync "$dir/." "$SHAREDIR/${dir##*/}" - - [ -f "$SHAREDIR/${dir##*/}/.rsync" ] || - printf '%s/%s\n' "$HOSTNAME" "${dir##*/}" > "$SHAREDIR/${dir##*/}/.rsync" + [ -f "$dir/.rsync" ] || + printf '%s/%s\n' "$HOSTNAME" "${dir##*/}" > "$dir/.rsync" done