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/sys-apps/superiotool/files/make-tarball.sh

35 lines
671 B

#!/bin/bash
. /lib/gentoo/functions.sh
svnrev() { svn info "$1" | awk '$1 == "Revision:" { print $NF }'; }
PN=superiotool
SVN_ROOT=${2:-/usr/local/src}
srcdir=${SVN_ROOT}/${PN}
PV=${1:-$(svnrev "${srcdir}")}
P=${PN}-${PV}
T=/tmp
if [[ -d ${srcdir} ]] ; then
cd "${T}" || die
rm -rf ${P}
ebegin "Exporting ${srcdir} ${PV} to ${P}"
svn export -q -r ${PV} ${srcdir} ${P}
eend $? || die
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 svn://coreboot.org/coreboot/trunk/util/superiotool"
die "need svn checkout dir"
fi