2020-10-15 17:27:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=maven-surefire
|
2021-02-05 16:26:11 +00:00
|
|
|
if [[ -n "$1" ]]; then
|
|
|
|
version="$1"
|
|
|
|
else
|
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
fi
|
2020-10-15 17:27:38 +00:00
|
|
|
|
|
|
|
# RETRIEVE
|
2021-02-05 16:26:11 +00:00
|
|
|
wget "https://repo1.maven.org/maven2/org/apache/maven/surefire/surefire/${version}/surefire-${version}-source-release.zip" -O "${name}-${version}.orig.zip"
|
2020-10-15 17:27:38 +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
|
|
|
|
|
2021-02-05 16:26:11 +00:00
|
|
|
tar czf "../${name}-${version}.tar.gz" *
|
2020-10-15 17:27:38 +00:00
|
|
|
cd ..
|
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.zip"
|