From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4534F1382C5 for ; Sun, 18 Apr 2021 16:29:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16A7BE0829; Sun, 18 Apr 2021 16:29:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F1640E0829 for ; Sun, 18 Apr 2021 16:29:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1E1B633BE6D for ; Sun, 18 Apr 2021 16:29:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 85446C3 for ; Sun, 18 Apr 2021 16:29:46 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1618763351.ffff493f902d98593dae94a30e1bb1b62f5cbbd7.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/netpbm/files/make-tarball.sh X-VCS-Directories: media-libs/netpbm/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: ffff493f902d98593dae94a30e1bb1b62f5cbbd7 X-VCS-Branch: master Date: Sun, 18 Apr 2021 16:29:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 733e2102-44fb-43aa-8409-1910d89a6e6f X-Archives-Hash: 7943ea74acc4959a93154eed056e8dbf commit: ffff493f902d98593dae94a30e1bb1b62f5cbbd7 Author: Mike Frysinger gentoo org> AuthorDate: Sun Apr 18 16:26:42 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Apr 18 16:29:11 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffff493f 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 gentoo.org> media-libs/netpbm/files/make-tarball.sh | 37 +++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh old mode 100644 new mode 100755 index 90a64ffb34d..29ad4b3d92e --- 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"