summaryrefslogtreecommitdiff
path: root/get-repos
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-17 21:49:48 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-17 21:49:48 -0400
commit1eed703c1b7287a71347d9ad2d05f2a0a3747b11 (patch)
treed8d66eebc0c57ff35c75423a06243711c4407c88 /get-repos
parent88472049c1e8ccd64f355eed2ce624954539944d (diff)
parenta3f0c2ac22109077ab25c61e2c3a9b5c332d4d50 (diff)
Merge branch 'master' into lukeshu/xbs
Conflicts: get-repos yf-update
Diffstat (limited to 'get-repos')
-rwxr-xr-xget-repos56
1 files changed, 0 insertions, 56 deletions
diff --git a/get-repos b/get-repos
deleted file mode 100755
index b8d2ccb..0000000
--- a/get-repos
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-# Gets repo databases and updates parabolaweb
-# Note: It works remotely because our parabolaweb server and repo server are
-# two different hosts
-
-trap_exit() {
- echo
- error "$@"
- exit 1
-}
-
-source "$(dirname "$(readlink -e "$0")")/config"
-source "$(dirname "$(readlink -e "$0")")/libremessages"
-
-# From makepkg
-set -E
-
-trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT
-trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
-trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-
-WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX")
-trap "rm -rf -- $(printf '%q' "${WORKDIR}")" EXIT
-
-DBLIST=()
-
-# Repos
-for _repo in "${PKGREPOS[@]}"; do
- for _arch in "${ARCHES[@]}"; do
- DBLIST+=("http://repo.parabolagnulinux.org/${_repo}/os/${_arch}/${_repo}${FILESEXT}")
- done
-done
-
-# Get them all
-msg "Retrieving ${#DBLIST[@]} databases"
-wget --directory-prefix=${WORKDIR} \
- --no-verbose \
- --force-directories \
- --no-host-directories \
- "${DBLIST[@]}" || true
-# Always return true, some databases are expect to be missing
-
-# Create the arches regexp arch1|arch2
-arch_re="$(echo "(${ARCHES[@]} i586)" | tr ' ' '|')"
-
-msg "Adding to parabolaweb"
-find "${WORKDIR}" -iname "*${FILESEXT}" | while read _db; do
- _arch=$(echo "${_db}" | egrep -o "${arch_re}")
-
- if [ -z "${_arch}" ]; then
- error "Can't find database architecture: ${_db}"
- continue
- fi
-
- "${WEB_DIR}"/manage.py reporead "${_arch}" "${_db}" || true
-done