Skip to content

Commit

Permalink
_pkg.sh: streamline test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Apr 9, 2024
1 parent f0450c2 commit 13aceb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ _cdo="$(pwd)"

if [ "${_NAM}" != "${_UNIPKG}" ]; then

find "${_DST}" -depth -type d -exec touch -c -r "$1" '{}' +
chmod -R a+rw-s,go-w "${_DST}"
# NOTE: Not effective on MSYS2:
find "${_DST}" -name '*.a' -exec chmod a-x '{}' +
Expand Down Expand Up @@ -72,14 +71,16 @@ create_pkg() {
win) find "${_BAS}" -exec attrib +A -R '{}' \;
esac

find "${_DST}" -depth -type d -exec touch -c -r "$1" '{}' +

rm -f "${_cdo}/${_pkg}"
case "${arch_ext}" in
.tar.xz) TZ=UTC tar --create \
--format=ustar \
--owner=0 --group=0 --numeric-owner \
--sort=name "${_BAS}" | xz > "${_cdo}/${_pkg}";;
.zip)
find "${_BAS}" -type f -o -type l | sort | \
find "${_BAS}" | sort | \
TZ=UTC zip --quiet -9 --strip-extra \
--names-stdin - > "${_cdo}/${_pkg}"
;;
Expand Down

0 comments on commit 13aceb4

Please sign in to comment.