This commit is contained in:
bigeagle 2016-07-27 23:30:55 +08:00
parent 41e933da6a
commit c0c5136848
No known key found for this signature in database
GPG Key ID: 9171A4571C27920A

View File

@ -2,7 +2,7 @@
set -e set -e
REPO=${REPO:-"/usr/local/bin/repo"} REPO=${REPO:-"/usr/local/bin/repo"}
USE_BITMAP_INDEX=${USE_BITMAPT_INDEX:-"0"} USE_BITMAP_INDEX=${USE_BITMAP_INDEX:-"0"}
function repo_init() { function repo_init() {
mkdir -p $TUNASYNC_WORKING_DIR mkdir -p $TUNASYNC_WORKING_DIR
@ -24,7 +24,7 @@ function git_repack() {
echo $repo, ${size}M echo $repo, ${size}M
git repack -a -b -d git repack -a -b -d
fi fi
done < <$(find $TUNASYNC_WORKING_DIR -type d -not -path "*/.repo/*" -name "*.git") done < <(find $TUNASYNC_WORKING_DIR -type d -not -path "*/.repo/*" -name "*.git")
} }
if [[ ! -d "$TUNASYNC_WORKING_DIR/git-repo.git" ]]; then if [[ ! -d "$TUNASYNC_WORKING_DIR/git-repo.git" ]]; then
@ -36,4 +36,4 @@ repo_sync
if [[ "$USE_BITMAP_INDEX" == "1" ]]; then if [[ "$USE_BITMAP_INDEX" == "1" ]]; then
git_repack git_repack
do fi