diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 12:26:42 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 12:29:11 -0400 |
commit | ffff493f902d98593dae94a30e1bb1b62f5cbbd7 (patch) | |
tree | 45318bb3a18d065583ab3761ad7d39ac49a84233 /media-libs | |
parent | sys-apps/file: drop redundant dodir (diff) | |
download | gentoo-ffff493f902d98593dae94a30e1bb1b62f5cbbd7.tar.gz gentoo-ffff493f902d98593dae94a30e1bb1b62f5cbbd7.tar.bz2 gentoo-ffff493f902d98593dae94a30e1bb1b62f5cbbd7.zip |
media-libs/netpbm: refresh make-tarball.sh helper
Make it shellcheck clean too with a little bit of effort.
Closes: https://bugs.gentoo.org/504408
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'media-libs')
-rwxr-xr-x[-rw-r--r--] | media-libs/netpbm/files/make-tarball.sh | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh index 90a64ffb34d7..29ad4b3d92e4 100644..100755 --- a/media-libs/netpbm/files/make-tarball.sh +++ b/media-libs/netpbm/files/make-tarball.sh @@ -1,13 +1,23 @@ #!/bin/bash +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 -. /etc/init.d/functions.sh +# Helper script for creating tarballs of netpbm releases since the netpbm +# project refuses to do so themselves for "current" releases. Their process +# is entirely contained in the svn repo. +# http://netpbm.sourceforge.net/getting_netpbm.php +# https://sourceforge.net/p/netpbm/code/HEAD/tree/ + +. /lib/gentoo/functions.sh PV=$1 SVN_ROOT=${2:-/usr/local/src} +NETPBM="${SVN_ROOT}/netpbm" +USERGUIDE="${NETPBM}/userguide" if [[ $# -eq 0 ]] ; then ebegin "Detecting latest version" - cd "${SVN_ROOT}/netpbm/release_number" + cd "${NETPBM}/release_number" || die svn up -q || die PV=$(svn ls | sort -V | tail -1) || die [[ -z ${PV} ]] && die @@ -17,9 +27,14 @@ if [[ $# -eq 0 ]] ; then if [[ ! -d ${PV} ]] ; then ebegin "Checking out ${PV}" - svn up -q ${PV} + svn up -q "${PV}" eend || die fi + + ebegin "Updating userguide" + cd "${USERGUIDE}" || die + svn up -q || die + eend fi if [[ $# -gt 2 ]] ; then @@ -32,28 +47,28 @@ P=${PN}-${PV} T=/tmp maint_pkg_create() { - local base="/usr/local/src" - local srcdir="${base}/netpbm/release_number" - local htmldir="${base}/netpbm/userguide" + local base="${SVN_ROOT}" + local srcdir="${NETPBM}/release_number" + local htmldir="${USERGUIDE}" if [[ -d ${srcdir} ]] ; then cd "${T}" || die - rm -rf ${P} + rm -rf "${P}" ebegin "Exporting ${srcdir}/${PV} to ${P}" - svn export -q "${srcdir}/${PV}" ${P} + svn export -q "${srcdir}/${PV}" "${P}" eend $? || return 1 ebegin "Exporting ${htmldir} to ${P}/userguide" - svn export -q "${htmldir}" ${P}/userguide + svn export -q "${htmldir}" "${P}"/userguide eend $? || return 1 ebegin "Generating manpages from html" - (cd "${P}/userguide" && ../buildtools/makeman *.html) + (cd "${P}/userguide" && ../buildtools/makeman ./*.html) eend $? || return 1 ebegin "Creating ${P}.tar.xz" - tar cf - ${P} | xz > ${P}.tar.xz + tar cf - "${P}" | xz > "${P}".tar.xz eend $? einfo "Tarball now ready at: ${T}/${P}.tar.xz" |