Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug fix #24

Merged
merged 2 commits into from

3 participants

@flamusdiu
Collaborator

-Fixed commit where js was called directly instead of through $JSBIN
-further fixes issue micha/jsawk#21

flamusdiu added some commits
@flamusdiu flamusdiu Bug fix
-Fixed commit where `js` was called directly instead of through `$JSBIN`
-further fixes issue micha/jsawk#21
4546c5e
@flamusdiu flamusdiu Updated PKGBUILD to new standards c5d8276
@flamusdiu
Collaborator

Updated the PKGBUILD to new standards. It's much cleaner and the pkgver auto-updates as well.

3,4c3,4
< pkgver=20110712
< pkgrel=2
---
> pkgver=1.3.2.gc031fef
> pkgrel=1
7a8,9
> source=('jsawk-git::git+https://github.com/micha/jsawk.git#branch=master')
> md5sums=('SKIP')
14,33c16,18
< _gitroot="git://github.com/micha/jsawk.git"
< _gitname="jsawk"
< 
< build() {
<   cd "$srcdir"
<   msg "Connecting to GIT server...."
< 
<   if [ -d $_gitname ] ; then
<     cd $_gitname && git pull origin
<     msg "The local files are updated."
<   else
<     git clone $_gitroot $_gitname
<   fi
< 
<   msg "GIT checkout done or server timeout"
<   msg "Starting make..."
< 
<   rm -rf "$srcdir/$_gitname-build"
<   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
<   cd "$srcdir/$_gitname-build"
---
> pkgver() {
>   cd "${srcdir}/${pkgname}"
>   git describe | sed 's/^v//;s/-/./g'
34a20
> 
36,37c22,24
<   cd "$srcdir/$_gitname-build"
<   install -Dm755 jsawk ${pkgdir}/usr/bin/jsawk
---
>   cd "$SRCDEST"
>   install -dm755 "${pkgdir}"/usr/bin/
>   install -Dm755 jsawk "${pkgdir}"/usr/bin/jsawk
@micha micha merged commit 7da2143 into from
@micha
Owner

@flamusdiu Thanks!

@flamusdiu
Collaborator

np

@bw57899

can be shorter:

out=$(echo "$res" |sed -n 's/^OUT:.//p;')
err=$(echo "$res" |sed -n 's/^ERR:.//p;')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2013
  1. @flamusdiu

    Bug fix

    flamusdiu authored
    -Fixed commit where `js` was called directly instead of through `$JSBIN`
    -further fixes issue micha/jsawk#21
  2. @flamusdiu
This page is out of date. Refresh to see the latest.
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')
Something went wrong with that request. Please try again.