diff options
author | sqrlfish | 2016-10-07 22:02:42 +0200 |
---|---|---|
committer | sqrlfish | 2016-10-07 22:02:42 +0200 |
commit | d3727b3739269ffcfed857fa069dabddb9055745 (patch) | |
tree | 75db2da43c0eea7bd3e253de8855c136b1dd2ddf /PKGBUILD | |
parent | 905863f434035ff04ceb8fa41295c6402638a4fe (diff) | |
download | aur-d3727b3739269ffcfed857fa069dabddb9055745.tar.gz |
More concise pkgver() using grep; python version correction made to work even if fixed in source
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -2,7 +2,7 @@ pkgname=stream2chromecast-git _pkgname=stream2chromecast pkgver=0.6.2 -pkgrel=1 +pkgrel=2 pkgdesc="Chromecast media streamer for Linux" arch=('any') url="https://github.com/Pat-Carter/${_pkgname}" @@ -18,24 +18,13 @@ pkgver() { cd "${srcdir}/${_pkgname}" ( set -o pipefail git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || - ( - regex="VERSION = \"([0-9\.]+)\"" - while read line - do - if [[ $line =~ $regex ]] - then - echo "${BASH_REMATCH[1]}" - break - fi - done < stream2chromecast.py - - ) + grep -Po '(?<=version: )([0-9\.]+)' stream2chromecast.py ) } package() { cd "${srcdir}/${_pkgname}" - sed -i '1s/env python/env python2/' stream2chromecast.py #requires python2 + sed -i '1s/env python$/env python2/' stream2chromecast.py #requires python2 install -D -m755 stream2chromecast.py "${pkgdir}/usr/bin/stream2chromecast" install -D -m644 cc_device_finder.py "${pkgdir}/usr/lib/python2.7/site-packages/cc_device_finder.py" install -D -m644 cc_media_controller.py "${pkgdir}/usr/lib/python2.7/site-packages/cc_media_controller.py" |