2018-07-31 12:27:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=maven-surefire
|
2021-05-14 16:38:36 +00:00
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
upstream_version="${version/'~'/'-'}"
|
2018-07-31 12:27:32 +00:00
|
|
|
|
|
|
|
# RETRIEVE
|
2021-05-14 16:38:36 +00:00
|
|
|
wget "https://repo1.maven.org/maven2/org/apache/maven/surefire/surefire/${upstream_version}/surefire-${upstream_version}-source-release.zip" -O "${name}-${version}.orig.zip"
|
2018-07-31 12:27:32 +00:00
|
|
|
|
|
|
|
rm -rf tarball-tmp
|
|
|
|
mkdir tarball-tmp
|
|
|
|
cd tarball-tmp
|
|
|
|
unzip "../${name}-${version}.orig.zip"
|
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
find -name '*.jar' -delete
|
|
|
|
find -name '*.class' -delete
|
|
|
|
|
2019-04-13 17:17:15 +00:00
|
|
|
tar czf "../${name}-${version}.tar.gz" *
|
2018-07-31 12:27:32 +00:00
|
|
|
cd ..
|
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.zip"
|