bigeagle преди 10 години
родител
ревизия
f7888e0239
променени са 4 файла, в които са добавени 8 реда и са изтрити 6 реда
  1. 1 1
      scripts/homebrew.sh
  2. 1 1
      scripts/linux.sh
  3. 1 1
      scripts/pypi.sh
  4. 5 3
      scripts/repo-ck.sh

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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 

+ 5 - 3
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