-
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathpsl.sh
More file actions
executable file
·34 lines (21 loc) · 732 Bytes
/
psl.sh
File metadata and controls
executable file
·34 lines (21 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
# Copyright (C) Viktor Szakats. See LICENSE.md
# SPDX-License-Identifier: MIT
# shellcheck disable=SC3040,SC2039
set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o pipefail
export _NAM _VER _OUT _BAS _DST
_NAM="$(basename "$0" | cut -f 1 -d '.')"
_VER="$1"
(
cd "${_NAM}" || exit 0
# Make steps for determinism
readonly _ref="${_PSL}"
# Create package
_OUT="${_NAM}-${_VER}${_REVSUFFIX}${_PKGSUFFIX}"
_BAS="${_NAM}-${_VER}${_PKGSUFFIX}"
_DST="$(pwd)/_pkg"; rm -r -f "${_DST}"
mkdir -p "${_DST}"
touch -c -r "${_ref}" LICENSE # when using the versioned tarball, this is redundant
cp -f -p LICENSE "${_DST}"/LICENSE.txt
../_pkg.sh "$(pwd)/${_ref}"
)