aboutsummaryrefslogtreecommitdiffstats
path: root/make_source_tarball.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make_source_tarball.sh')
-rwxr-xr-xmake_source_tarball.sh26
1 files changed, 6 insertions, 20 deletions
diff --git a/make_source_tarball.sh b/make_source_tarball.sh
index 3843eed..30fba39 100755
--- a/make_source_tarball.sh
+++ b/make_source_tarball.sh
@@ -19,43 +19,30 @@ set -e
usage()
{
- echo "$0 <tag> <output directory> [-j N] [-T N]"
+ echo "$0 <tag> <output directory> [-j N]"
echo " -j N use at most N download jobs to run in parallel;"
echo " the default is 4;"
- echo " -T N use at most N threads to compress the tarball;"
- echo " the default is 1; set to 0 to use as many threads"
- echo " as there are processor cores"
-
exit 1
}
jobs=4
-threads=1
get_option()
{
option="$1"
value="$2"
- if [ "${option}" = "-T" ] ; then
- threads="${value}"
- elif [ "${option}" = "-j" ] ; then
+ if [ "${option}" = "-j" ] ; then
jobs="${value}"
else
usage
fi
}
-if [ $# -ne 2 -a $# -ne 4 -a $# -ne 6 ] ; then
+if [ $# -ne 2 -a $# -ne 4 ] ; then
usage
elif [ $# -eq 4 ] ; then
get_option "$3" "$4"
-elif [ $# -eq 6 ] ; then
- if [ "$3" = "$5" ] ; then
- usage
- fi
- get_option "$3" "$4"
- get_option "$5" "$6"
fi
tag="$1"
@@ -98,10 +85,9 @@ fi
cd ..
tarball="${tag}.tar"
-if [ ! -f "${tarball}" ] && [ ! -f "${tarball}.xz" ] ; then
- tar cf "${tarball}" "${replicant_dir}" || rm -f "${tarball}"
+if [ ! -f "${tarball}" ] && [ ! -f "${tarball}.lz" ] ; then
+ tar cf "${tarball}" "${tag}" || rm -f "${tarball}"
fi
# TODO: Make the tarball reproducible by removing metadata
-
-xz -T "${threads}" -9e --verbose "${tarball}"
+lzip -vv -9 "${tarball}"