WIP: device-*: set url to wiki page link
Fixes #96 (closed). (Do I need to rebuild the packages for the changes to take proper effect? Do I need to increase the pkgrel?)
Here's the quick script I used to do this:
#!/usr/bin/env bash
for i in device-*; do
source $i/APKBUILD
source $i/deviceinfo
wikititle="${deviceinfo_name//\ /_}_($(echo $pkgname | sed 's/device-//'))"
wikilink="https://wiki.postmarketos.org/wiki/$wikititle"
wikilink_escaped="https:\/\/wiki.postmarketos.org\/wiki\/$wikititle"
echo "Trying to get wiki page for $wikititle ($pkgname):"
if ! content=$(curl "$wikilink" -q) || echo "$content" | grep "There is currently no text in this page."; then
echo "FAILED!!!"
else
echo 'Found.'
sed 's/url\=\"https\:\/\/postmarketos\.org\"/url\=\"'$wikilink_escaped'\"/' -i $i/APKBUILD || echo "Replace failed."
fi
done
Edited by Administrator