mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
weave: add support for DRY_RUN
This commit is contained in:
parent
be96613c3a
commit
a71f255e6b
9
weave.sh
9
weave.sh
@ -38,7 +38,6 @@ function git_clone_or_pull {
|
||||
function git_repack() {
|
||||
echo "Start writing bitmap index"
|
||||
while read repo; do
|
||||
echo $repo
|
||||
cd $repo
|
||||
size=$(du -sm .|cut -f1)
|
||||
if [[ "$size" -gt "100" ]]; then
|
||||
@ -52,9 +51,13 @@ git_clone_or_pull $MANIFEST_URL $MANIFEST_DIR
|
||||
|
||||
for repo in $($MANIFEST_XML_REPOLIST $MANIFEST_DIR/default.xml weave); do
|
||||
contains $repo ${IGNORED_REPO[@]} && continue
|
||||
if [[ -z ${DRY_RUN:-} ]]; then
|
||||
echo $TUNASYNC_UPSTREAM_URL/$repo
|
||||
git_clone_or_pull $TUNASYNC_UPSTREAM_URL/$repo $TUNASYNC_WORKING_DIR/$repo yes
|
||||
done
|
||||
|
||||
if [[ "$USE_BITMAP_INDEX" == "1" ]]; then
|
||||
git_repack
|
||||
fi
|
||||
else
|
||||
echo $TUNASYNC_UPSTREAM_URL/$repo
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user