Permalink
Browse files

Merge pull request #24 from flamusdiu/master

Bug fix
  • Loading branch information...
2 parents c031fef + c5d8276 commit 7da2143505e7bc34ca5f3639cda4fa4d79cec997 @micha committed Oct 30, 2013
Showing with 26 additions and 1 deletion.
  1. +25 −0 PKGBUILD
  2. +1 −1 jsawk
View
25 PKGBUILD
@@ -0,0 +1,25 @@
+# Contributor: Andreas B. Wagner <AndreasBWagner@pointfree.net>
+pkgname=jsawk-git
+pkgver=1.3.2.gc031fef
+pkgrel=1
+pkgdesc="like awk, but for JSON"
+arch=('i686' 'x86_64')
+url="http://github.com/micha/jsawk"
+source=('jsawk-git::git+https://github.com/micha/jsawk.git#branch=master')
+md5sums=('SKIP')
+license=('unknown')
+depends=('js')
+makedepends=('git')
+provides=('jsawk')
+conflicts=('jsawk')
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ git describe | sed 's/^v//;s/-/./g'
+}
+
+package() {
+ cd "$SRCDEST"
+ install -dm755 "${pkgdir}"/usr/bin/
+ install -Dm755 jsawk "${pkgdir}"/usr/bin/jsawk
+}
View
2 jsawk
@@ -1315,7 +1315,7 @@ fi
JSBIN=${js_arg:-${JS:-js}}
ret=$?
-res=$(cat $TMP2 2>/dev/null | js $TMP1 $nlines "$@")
+res=$(cat $TMP2 2>/dev/null | $JSBIN $TMP1 $nlines "$@")
out=$(echo "$res" |sed '/^OUT: /s/^.....//p;d')
err=$(echo "$res" |sed '/^ERR: /s/^.....//p;d')

0 comments on commit 7da2143

Please sign in to comment.