diff options
author | Fahad Hossain | 2018-12-19 00:34:46 +0600 |
---|---|---|
committer | Fahad Hossain | 2018-12-19 00:34:46 +0600 |
commit | 240537ef915788afd8aa84632b318d711172c393 (patch) | |
tree | d0a972c6595ea2ae46a85c4aab2faa703037a06a /update_pkg.sh | |
parent | 8f7a081d7466df2f52eeca24439c62eb3f3e21db (diff) | |
download | aur-240537ef915788afd8aa84632b318d711172c393.tar.gz |
use repo instead of package info page
since ubuntu's web interface is broken, use the repo listing instead
Diffstat (limited to 'update_pkg.sh')
-rwxr-xr-x | update_pkg.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/update_pkg.sh b/update_pkg.sh index 44cfdce6ac54..b83ac0d27fce 100755 --- a/update_pkg.sh +++ b/update_pkg.sh @@ -1,11 +1,20 @@ #!/bin/bash +REPO='http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/' +PACKAGE=$(wget -qO- $REPO | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_(.*?)-(.*?18\.10\.[1-9])_amd64.deb).*/\1#\2#\3/p" | sort | tail -n 1) -ver=$(curl -sL 'https://packages.ubuntu.com/cosmic/amd64/chromium-codecs-ffmpeg-extra/download' |pup 'kbd text{}'|head -n1 | cut -d_ -f2) -md5=$(curl -sL 'https://packages.ubuntu.com/cosmic/amd64/chromium-codecs-ffmpeg-extra/download' |pup '#pdownloadmeta tr:nth-child(2) tt text{}'|head -n1) +deb=$(echo $PACKAGE | cut -d# -f1) +ver1=$(echo $PACKAGE | cut -d# -f2) +ver2=$(echo $PACKAGE | cut -d# -f3) -ver1=$(echo $ver | cut -d\- -f1) -ver2=$(echo $ver | cut -d\- -f2) +cur=$(pwd) +tmp=$(mktemp -d) +cd $tmp +wget -q "$REPO$deb" +md5=$(md5sum $deb | cut -d\ -f1) +cd $cur sed -i "s|^pkgver=.*$|pkgver=${ver1}|" PKGBUILD sed -i "s|^pkgver2=.*$|pkgver2=${ver2}|" PKGBUILD sed -i "s|^md5sums.*$|md5sums=(\"${md5}\")|" PKGBUILD + +makepkg --printsrcinfo > .SRCINFO |