aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-29 17:24:00 +0000
committermerakor <cem@ckyln.com>2020-05-29 17:24:00 +0000
commite1382bbd8d07304021b20f91f2c8119c1b0bff20 (patch)
treeea33e77235dacd20a0e8a3cad8cfdc59fc65a095 /doc
parent705b8d5a326d67c2829421695cb14a2877104bc4 (diff)
downloadcpt-e1382bbd8d07304021b20f91f2c8119c1b0bff20.tar.gz
doc: update sample script
FossilOrigin-Name: 4ff8199d4ee0a914db22d294a15c567a39ffaea4afd21fa9a6f0a00b07f1968d
Diffstat (limited to 'doc')
-rw-r--r--doc/rsync-repositories.txt14
1 files changed, 5 insertions, 9 deletions
diff --git a/doc/rsync-repositories.txt b/doc/rsync-repositories.txt
index 71fca39..dfe3cb5 100644
--- 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