Check-in [ecf92091f8]
Overview
Comment:Updated to support tagging a package as beta when doing CPIO
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ecf92091f83a85634572afa7f44be58f4d2bd046
User & Date: rkeene on 2019-12-13 00:10:06
Other Links: manifest | tags
Context
2019-12-13
00:11
Updated root CA certificate, the previous one expired, and made errors about this more informative check-in: 7241c0986c user: rkeene tags: trunk
00:10
Updated to support tagging a package as beta when doing CPIO check-in: ecf92091f8 user: rkeene tags: trunk
00:09
Updated URLs to tcllib check-in: 6172840058 user: rkeene tags: trunk
Changes

Modified appfs-mkfs from [6085412bf1] to [a9c4f4dd01].

20
21
22
23
24
25
26
27

28








29
30
31
32
33
34
35
20
21
22
23
24
25
26

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43







-
+

+
+
+
+
+
+
+
+







# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

PATH="${PATH}:$(cd "$(dirname "$(which "$0")")" && pwd)"

if [ "$1" == '--cpio' ]; then
if [ "$1" = '--cpio' ]; then
	shift

	if [ "$1" = '--beta' ]; then
		shift

		setLatest=0
	else
		setLatest=1
	fi

	mode='file'

	pkgfile="$1"
else
	mode='dir'

44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66







-
+







fi

if [ -n "${sitecert}" ]; then
	sitecert="$(readlink -f "${sitecert}")"
fi

if [ -z "${pkgsdir}" -a -z "${pkgfile}" ] || [ -z "${appfsdir}" ]; then
	echo 'Usage: appfs-mk {--cpio <pkgfile>|<pkgsdir>} <appfsdir> [<site-key> [<site-certificate>]]' >&2
	echo 'Usage: appfs-mk {--cpio [--beta] <pkgfile>|<pkgsdir>} <appfsdir> [<site-key> [<site-certificate>]]' >&2

	exit 1
fi

appfsdir="$(cd "${appfsdir}" && pwd)"
if [ -z "${appfsdir}" ]; then
	echo "Unable to find appfs directory." >&2
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171







-
+








		dirdate="$(find . -type f -printf '%TY%Tm%Td%TH%TM.%TS\n' -quit | cut -f 1-2 -d '.')"
		find . -type d -print0 | xargs -0 -- touch -t "${dirdate}"

		# If this archive contains exactly one package mark it as the latest version
		chk_package="$(echo *)"
		if [ -d "${chk_package}" ]; then
			default_isLatest='1'
			default_isLatest="${setLatest:-1}"
		fi

		cat "${oldpackagelistfile}" 2>/dev/null | (
			if [ -d "${chk_package}" ]; then
				sed 's@^\('"{chk_package}"',.*\),1@\1,0@'
			else
				cat