summaryrefslogtreecommitdiff
path: root/liste-verfuegbare-Versionen
diff options
context:
space:
mode:
Diffstat (limited to 'liste-verfuegbare-Versionen')
-rwxr-xr-xliste-verfuegbare-Versionen31
1 files changed, 21 insertions, 10 deletions
diff --git a/liste-verfuegbare-Versionen b/liste-verfuegbare-Versionen
index c3362ae81..185329670 100755
--- a/liste-verfuegbare-Versionen
+++ b/liste-verfuegbare-Versionen
@@ -2,19 +2,30 @@
provided=$(mktemp)
-sources=(
- /var/lib/pacman/sync
- /mnt/archlinux/archlinux
- /mnt/archlinux
-)
-
-sudo pacman -Sy >/dev/null || exit $?
+if grep -qxF 'ID=arch' /etc/os-release; then
+ sources=(
+ /var/lib/pacman/sync
+ /mnt/archlinux/archlinux
+ /mnt/archlinux
+ )
+ sudo pacman -Sy >/dev/null || exit $?
+else
+ sources=(
+ http://pkgcache.eckner.net/arch/x86_64/core/core.db.tar.gz
+ http://pkgcache.eckner.net/arch/x86_64/extra/extra.db.tar.gz
+ )
+fi
for i in "${!sources[@]}"; do
source="${sources["${i}"]}"
- find "${source}" -name '*.db' \
- -exec bsdtar -Oxzf {} \; \
- 2>/dev/null \
+ if [ -z "${source##*://*}" ]; then
+ curl -Ss "${source}" \
+ | bsdtar -Oxzf
+ else
+ find "${sources["${i}"]}" -name '*.db' \
+ -exec bsdtar -Oxzf {} \; \
+ 2>/dev/null \
+ fi \
| sed -n '
/^%\(NAME\|VERSION\)%$/ {
N