summarylogtreecommitdiffstats
path: root/update_pkg.sh
diff options
context:
space:
mode:
authorMatti Viljanen2019-11-30 16:01:13 +0200
committerMatti Viljanen2019-11-30 16:01:13 +0200
commit70c6580630c76eca652b695f6ccc932c6373e38e (patch)
treed24e7da134537da956f923b2c1daf52e5ff8b585 /update_pkg.sh
parenta0fb725a1a3f4bdc8581a7a8b1ff9de58efeca00 (diff)
downloadaur-70c6580630c76eca652b695f6ccc932c6373e38e.tar.gz
Use perl instead of grep and sed
Diffstat (limited to 'update_pkg.sh')
-rwxr-xr-xupdate_pkg.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/update_pkg.sh b/update_pkg.sh
index 72b6b32f58a2..a8779390f146 100755
--- a/update_pkg.sh
+++ b/update_pkg.sh
@@ -1,6 +1,6 @@
#!/bin/bash
REPO='http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/'
-PACKAGE=$(wget -qO- $REPO | sed -e 's/<[^>]*>//g' | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_(.*?)-(\w{8}).(.*?)_amd64.deb).*/\1#\2#\3#\4/p" | sort | tail -n 1)
+PACKAGE=$(wget -qO- $REPO | perl -ne '/(?<=href=")(chromium-codecs-ffmpeg-extra_(.*?)-(\w{8}).(.*?)_amd64.deb)(?=")/ and print "$1#$2#$3#$4\n";' | sort | tail -n 1)
deb=$(echo $PACKAGE | cut -d# -f1)
ver1=$(echo $PACKAGE | cut -d# -f2)