Loading build-community.sh +7 −3 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,10 @@ repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" # Determine the number of parallel jobs to use for repo sync nproc_value=$(nproc --all) JOBS=$(( nproc_value > 10 ? 10 : nproc_value )) # cd to working directory # cd to working directory cd "$SRC_DIR" cd "$SRC_DIR" Loading Loading @@ -66,7 +70,7 @@ if [ "$LOCAL_MIRROR" = true ]; then fi fi echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" repo sync -j$(nproc --all) --force-sync --no-clone-bundle &>>"$repo_log" repo sync -j"$JOBS" --force-sync --no-clone-bundle &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading Loading @@ -160,7 +164,7 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log" builddate=$(date +%Y%m%d) builddate=$(date +%Y%m%d) repo sync -c -j$(nproc --all) --force-sync &>>"$repo_log" repo sync -c -j"$JOBS" --force-sync &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading Loading @@ -245,7 +249,7 @@ for branch in ${BRANCH_NAME//,/ }; do if [ "$LOCAL_MIRROR" = true ]; then if [ "$LOCAL_MIRROR" = true ]; then echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" cd "$MIRROR_DIR" cd "$MIRROR_DIR" repo sync -j$(nproc --all) --force-sync --no-clone-bundle &>>"$repo_log" repo sync -j"$JOBS" --force-sync --no-clone-bundle &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading Loading
build-community.sh +7 −3 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,10 @@ repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" # Determine the number of parallel jobs to use for repo sync nproc_value=$(nproc --all) JOBS=$(( nproc_value > 10 ? 10 : nproc_value )) # cd to working directory # cd to working directory cd "$SRC_DIR" cd "$SRC_DIR" Loading Loading @@ -66,7 +70,7 @@ if [ "$LOCAL_MIRROR" = true ]; then fi fi echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" repo sync -j$(nproc --all) --force-sync --no-clone-bundle &>>"$repo_log" repo sync -j"$JOBS" --force-sync --no-clone-bundle &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading Loading @@ -160,7 +164,7 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing branch repository" | tee -a "$repo_log" builddate=$(date +%Y%m%d) builddate=$(date +%Y%m%d) repo sync -c -j$(nproc --all) --force-sync &>>"$repo_log" repo sync -c -j"$JOBS" --force-sync &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading Loading @@ -245,7 +249,7 @@ for branch in ${BRANCH_NAME//,/ }; do if [ "$LOCAL_MIRROR" = true ]; then if [ "$LOCAL_MIRROR" = true ]; then echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log" cd "$MIRROR_DIR" cd "$MIRROR_DIR" repo sync -j$(nproc --all) --force-sync --no-clone-bundle &>>"$repo_log" repo sync -j"$JOBS" --force-sync --no-clone-bundle &>>"$repo_log" if [ $? != 0 ]; then if [ $? != 0 ]; then sync_successful=false sync_successful=false Loading