2222#
2323build=CMakeFiles
2424
25- # Directory containing the distribution archives
26- #
27- dist=" $build /dist"
28-
2925# Create source directory
30- mkdir -p " $dist "
26+ mkdir -p " $build / dist"
3127OUTPUT_DIR=" $build /apache-log4cxx-$VERSION "
3228if [ -f " $OUTPUT_DIR " ]; then
3329 if [ ! -d " $OUTPUT_DIR " ]; then
@@ -58,7 +54,7 @@ rm -r "$OUTPUT_DIR"/src/main/abi-symbols
5854# Create TAR file
5955#
6056# See https://reproducible-builds.org/docs/archives/ for reproducibility tips
61- TAR_ARCHIVE=" $dist /apache-log4cxx-$VERSION .tar.gz"
57+ TAR_ARCHIVE=" $build / dist/apache-log4cxx-$VERSION .tar.gz"
6258echo ' Tar version:'
6359tar --version | sed -e ' s/^/\t/'
6460echo ' Gzip version:'
@@ -68,20 +64,21 @@ if [ -f "$TAR_ARCHIVE" ]; then
6864 exit 1
6965fi
7066
71- tar --transform=" s!^$OUTPUT_DIR !apache-log4cxx-$VERSION !" \
72- --mtime=" $OUTPUT_TIMESTAMP " \
73- --owner=0 --group=0 --numeric-owner \
74- --sort=name \
75- --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
76- --create --gzip --file " $TAR_ARCHIVE " " $OUTPUT_DIR "
77-
67+ (
68+ cd " $build "
69+ tar --mtime=" $OUTPUT_TIMESTAMP " \
70+ --owner=0 --group=0 --numeric-owner \
71+ --sort=name \
72+ --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
73+ --create --gzip --file " dist/apache-log4cxx-$VERSION .tar.gz" " $OUTPUT_DIR "
74+ )
7875echo -e Tar archive: " $TAR_ARCHIVE "
7976
8077# Create ZIP file
8178#
8279# See https://reproducible-builds.org/docs/archives/ for reproducibility tips
8380# Change the mtime of all files
84- ZIP_ARCHIVE=" $dist /apache-log4cxx-$VERSION .zip"
81+ ZIP_ARCHIVE=" $build / dist/apache-log4cxx-$VERSION .zip"
8582echo ' Zip version:'
8683zip --version | sed ' s/^/\t/'
8784if [ -f " $ZIP_ARCHIVE " ]; then
0 commit comments