aboutsummaryrefslogtreecommitdiffstats
path: root/stage4
diff options
context:
space:
mode:
authorSerge Schneider <[email protected]>2020-01-27 15:20:33 +0000
committerSerge Schneider <[email protected]>2020-01-27 15:20:33 +0000
commitbdbd85892e8a80bd69366ea7f84f8ea1f2a0433f (patch)
treee1672e2abcc5914fd2f878607d0a58c3004ea24f /stage4
parentca31aef1f74294a767ff8f6fb55e904aa21a4cf8 (diff)
Update MagPi URL scheme
Diffstat (limited to 'stage4')
-rwxr-xr-xstage4/03-magpi/00-run.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/stage4/03-magpi/00-run.sh b/stage4/03-magpi/00-run.sh
index cc5a820..b27b85f 100755
--- a/stage4/03-magpi/00-run.sh
+++ b/stage4/03-magpi/00-run.sh
@@ -1,12 +1,12 @@
#!/bin/sh -e
magpi_regex="MagPi[[:digit:]]*.pdf"
-magpi_loc="https://www.raspberrypi.org/magpi-issues"
-magpi_latest="$(curl "$magpi_loc/?C=M;O=D" -s | grep "$magpi_regex" -m 1 -o | head -n 1)"
+magpi_loc="$(curl -s https://magpi.raspberrypi.org/latest-pdf)"
+magpi_latest="$(echo "$magpi_loc" | grep "$magpi_regex" -m 1 -o)"
if [ ! -f "files/$magpi_latest" ]; then
find files/ -regextype grep -regex "files/$magpi_regex" -delete
- wget "$magpi_loc/$magpi_latest" -O "files/$magpi_latest"
+ wget "$magpi_loc" -O "files/$magpi_latest"
fi
file "files/$magpi_latest" | grep -q "PDF document"