summaryrefslogtreecommitdiff
path: root/sys-apps/superiotool/files/make-tarball.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/superiotool/files/make-tarball.sh
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/superiotool/files/make-tarball.sh')
-rwxr-xr-xsys-apps/superiotool/files/make-tarball.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-apps/superiotool/files/make-tarball.sh b/sys-apps/superiotool/files/make-tarball.sh
new file mode 100755
index 000000000000..3711db140db3
--- /dev/null
+++ b/sys-apps/superiotool/files/make-tarball.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/init.d/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