From e370c555ba9126261fe1f86ee97dace0e73a3a14 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 May 2025 12:49:05 +0530 Subject: [PATCH] Centralise rsync excludes --- rsync-and-build.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 rsync-and-build.sh diff --git a/rsync-and-build.sh b/rsync-and-build.sh new file mode 100644 index 0000000000..c6dad48d02 --- /dev/null +++ b/rsync-and-build.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# To be used via a script such as +: <<'COMMENT' +export RSYNC_PASSWORD=password +export BUILDBOT=rsync://username@server/path/to/this/directory +cd ~/calibre-src || exit 1 + +script=rsync-and-build.sh +if [[ -e "$script" ]]; then + source "$script" +else + rsync -a --include "$script" --exclude '*' "$BUILDBOT" . && source "$script" +fi +COMMENT + +rsync -a --delete --force --exclude bypy/b --exclude src/calibre/plugins --exclude manual --exclude ".*cache" --exclude .git --exclude build --exclude dist --exclude "*.pyj-cached" --exclude "*.pyc" --exclude "*.pyo" --exclude "*.swp" --exclude "*.swo" --exclude format_docs "$BUILDBOT" .