diff --git a/scripts/homebrew.sh b/scripts/homebrew.sh index 922d994..352a67b 100755 --- a/scripts/homebrew.sh +++ b/scripts/homebrew.sh @@ -6,7 +6,7 @@ fi function update_homebrew_git() { cd $TUNASYNC_WORKING_DIR - git remote -v update + /usr/bin/timeout -s INT 3600 git remote -v update } update_homebrew_git diff --git a/scripts/linux.sh b/scripts/linux.sh index 8c783ed..dca5e3c 100755 --- a/scripts/linux.sh +++ b/scripts/linux.sh @@ -6,7 +6,7 @@ fi function update_linux_git() { cd $TUNASYNC_WORKING_DIR - git remote -v update + /usr/bin/timeout -s INT 3600 git remote -v update } update_linux_git diff --git a/scripts/pypi.sh b/scripts/pypi.sh index e7b7c56..7989dc1 100755 --- a/scripts/pypi.sh +++ b/scripts/pypi.sh @@ -4,4 +4,4 @@ if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then exit 1 fi -/usr/bin/timeout -s INT 3600 /home/tuna/.virtualenvs/bandersnatch/bin/bandersnatch -c /etc/bandersnatch.conf mirror || exit 1 +/usr/bin/timeout -s INT 3600 /home/tuna/.virtualenvs/bandersnatch/bin/bandersnatch -c /etc/bandersnatch.conf mirror diff --git a/scripts/repo-ck.sh b/scripts/repo-ck.sh index d8c35d2..57a14e6 100755 --- a/scripts/repo-ck.sh +++ b/scripts/repo-ck.sh @@ -6,9 +6,11 @@ function sync_repo_ck() { [ ! -d "$repo_dir" ] && mkdir -p "$repo_dir" cd $repo_dir - lftp "${repo_url}/" -e 'mirror -v -P 5 --delete --only-missing --only-newer --no-recursion; bye' + lftp "${repo_url}/" -e 'mirror -v -P 5 --delete --only-missing --only-newer --no-recursion; bye' || return 1 wget "${repo_url}/repo-ck.db" -O "repo-ck.db" } -sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64" -sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686" +stat=0 +sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64" || stat=1 +sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686" || stat=1 +exit $stat