From e3eb57bd06a7b2b4649dca56d2b8c01873986389 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 May 2016 10:30:33 +0200 Subject: checkbashisms neu --- checkbashisms/.gitignore | 1 + checkbashisms/PKGBUILD | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 checkbashisms/.gitignore create mode 100644 checkbashisms/PKGBUILD (limited to 'checkbashisms') diff --git a/checkbashisms/.gitignore b/checkbashisms/.gitignore new file mode 100644 index 00000000..f52a3f68 --- /dev/null +++ b/checkbashisms/.gitignore @@ -0,0 +1 @@ +checkbashisms* diff --git a/checkbashisms/PKGBUILD b/checkbashisms/PKGBUILD new file mode 100644 index 00000000..a24aa569 --- /dev/null +++ b/checkbashisms/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Erich Eckner +# Contributor: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: RunningDroid +# Contributor: Daniel Micay +# Contributor: Soup +# Contributor: Andres Perera + +set -u +pkgname='checkbashisms' +pkgver='20160203' +# To get the date of the last commit for this file +# Be in the tree for the .pl file +# https://anonscm.debian.org/cgit/collab-maint/devscripts.git/tree/scripts/checkbashisms.pl +# Click [search] +# To see the diff, click on the commit +pkgrel='3' +pkgdesc='Debian script that checks for bashisms' +arch=('any') +url='http://packages.qa.debian.org/d/devscripts.html' +license=('GPL') +depends=('perl') +conflicts=('devscripts') +_srcfile="checkbashisms.pl.${pkgver}" +_srcbash='checkbashisms.bash_completion.20160513' +source=("${_srcfile}::https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.pl" + 'https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.1' + "${_srcbash}::https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.bash_completion" # https://anonscm.debian.org/cgit/collab-maint/devscripts.git/log/scripts/checkbashisms.bash_completion?qt=grep&q= +) +sha256sums=('6943f31aae8552fdec53f5d4c386f08ec029630bf0df46576c2d7c43a2f25081' + 'c74d1ed33fee4cf2ccca0d7690d404d551a4edcbde0ddc602104d9198359cefb' + '08f1587d3219b494377ef1af265f71f11c67c291d846b4c1f886a04b90eeb860') + +# Version checking devscripts won't help us. We need to watch for changes to this file. +_vercheck() { :; } +_verscan() { + local _rv=1 + [ "$1" -ne 0 ] && _rv=0 + local _rvfile='' + local _remfile="$(sha256sum < <(curl -s "${source[0]##*::}") | cut -d' ' -f1)" + if [ "${_remfile}" != "${sha256sums[0]}" ]; then + local _vercmp=1 + [ "$2" -ge 3 ] && printf '%-s %s\n' "${_vercmp}" "${_remfile}" 1>&2 + if [ "${_vercmp}" -ge 1 ]; then + [ "$2" -eq 2 ] && echo "${_remfile}" + _rvfile="${_remfile}" + _rv=0 + fi + fi + [ "$2" -eq 1 -o "$2" -eq 4 ] && echo "${_rvfile}" + return ${_rv} +} +#_verscan 0 4; exit 1 + +package() { + set -u + cd "${pkgdir}" + install -Dpm755 "${srcdir}/${_srcfile}" 'usr/bin/checkbashisms' + sed -i -e "s,###VERSION###,${pkgver},g" 'usr/bin/checkbashisms' + install -Dpm644 "${srcdir}/checkbashisms.1" 'usr/share/man/man1/checkbashisms.1' + install -Dpm644 "${srcdir}/${_srcbash}" 'usr/share/bash-completion/completions/checkbashisms' + set +u +} +set +u -- cgit v1.2.3-70-g09d2