summaryrefslogtreecommitdiff
path: root/parabola-mirror-lastupdates
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2014-11-05 11:35:35 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2014-11-05 11:35:35 -0300
commitca9fc26153909ab3758bfce9343db821a532515a (patch)
tree9a38788603c34ac4bcf6b5ab802adc830e5aa512 /parabola-mirror-lastupdates
parente633ce6e35bd840c88719b42252e10a243294257 (diff)
parabola-mirror-lastupdates: Add script
Diffstat (limited to 'parabola-mirror-lastupdates')
-rwxr-xr-xparabola-mirror-lastupdates10
1 files changed, 10 insertions, 0 deletions
diff --git a/parabola-mirror-lastupdates b/parabola-mirror-lastupdates
new file mode 100755
index 0000000..a4b7356
--- /dev/null
+++ b/parabola-mirror-lastupdates
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Quickly get Parabola mirror repositories update times
+# It uses the file "lastupdate"
+# WARNING: it only updates on Parabola-specific changes (it does not reflect new or upgraded Arch packages)
+
+grep -Po 'Server = \Khttp.?//.+(?=/\$repo)' /etc/pacman.d/mirrorlist | while read url ; do
+ echo "=> Checking ${url}/lastupdate"
+ date -u -d @"$(curl -s ${url}/lastupdate)"
+done