2019-03-12 17:10:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=plexus-languages
|
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
2021-02-17 18:11:59 +01:00
|
|
|
pkgdir=`cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd`
|
|
|
|
|
|
|
|
tmpdir=`mktemp -d`
|
|
|
|
echo $tmpdir
|
|
|
|
trap 'rm -r "$tmpdir"' EXIT
|
|
|
|
pushd "$tmpdir" >/dev/null
|
2019-03-12 17:10:46 +01:00
|
|
|
|
|
|
|
# RETRIEVE
|
|
|
|
wget "https://github.com/codehaus-plexus/plexus-languages/archive/plexus-languages-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
|
|
|
|
2021-02-17 18:11:59 +01:00
|
|
|
treeroot="$tmpdir/tree"
|
|
|
|
mkdir "$tmpdir/tree"
|
|
|
|
pushd "$treeroot" >/dev/null
|
|
|
|
|
2019-03-12 17:10:46 +01:00
|
|
|
tar xf "../${name}-${version}.orig.tar.gz"
|
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
find -name '*.jar' -delete
|
|
|
|
find -name '*.class' -delete
|
|
|
|
|
2021-02-17 18:11:59 +01:00
|
|
|
tar cJf "$pkgdir/${name}-${version}.tar.xz" *
|