You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/netpbm/files/make-tarball.sh

42 lines
772 B

#!/bin/bash
. /etc/init.d/functions.sh
if [[ $# -eq 0 || $# -gt 2 ]] ; then
exec echo "Usage: $0 <version> [netpbm svn root]"
fi
PN=netpbm
PV=$1
P=${PN}-${PV}
SVN_ROOT=${2:-/usr/local/src}
T=/tmp
maint_pkg_create() {
local base="/usr/local/src"
local srcdir="${base}/netpbm/release_number"
if [[ -d ${srcdir} ]] ; then
cd "${T}" || die
rm -rf ${P}
ebegin "Exporting ${srcdir}/${PV} to ${P}"
svn export -q ${srcdir}/${PV} ${P}
eend $? || return 1
ebegin "Creating ${P}.tar.xz"
tar cf - ${P} | xz > ${P}.tar.xz
eend $?
einfo "Tarball now ready at: ${T}/${P}.tar.xz"
else
einfo "You need to run:"
einfo " cd ${base}"
einfo " svn co https://netpbm.svn.sourceforge.net/svnroot/netpbm"
die "need svn checkout dir"
fi
}
maint_pkg_create