Skip to content

Instantly share code, notes, and snippets.

@magthe
Created November 15, 2010 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magthe/700166 to your computer and use it in GitHub Desktop.
Save magthe/700166 to your computer and use it in GitHub Desktop.
Increase the pkgrel of a PKGBUILD for ArchLinux
#! /bin/bash
ifile=$1; shift
ofile=$1; shift
awk '/^pkgrel/ { match( $0, /^pkgrel=([[:digit:]]+)/, Arr ); printf "pkgrel=%s\n", Arr[1]+1 }
! /^pkgrel/ { print }
' ${ifile} > ${ofile}.tmp
mv ${ofile}.tmp ${ofile}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment