Diff
Not logged in

Differences From Artifact [52453fa5b0]:

To Artifact [a7d805fc2b]:


1
2
3
4
5
6
7
8
9

10
11
12

13
14
15
16
17
18
19
1
2
3
4
5
6
7
8

9



10
11
12
13
14
15
16
17








-
+
-
-
-
+







#!/bin/bash

if [ ! -x "$(command -v tclsh)" ]; then
  echo "The program 'tclsh' is apparently not installed."
  echo "Please use 'apt-get install tcl8.6' (Linux)."
  exit 1
fi

echo "exit [catch {package require tls}]" | tclsh
if ! echo "exit [catch {package require tls}]" | tclsh; then

if [ $? -ne 0 ]; then
  echo the "The 'tls' package for Tcl is not installed."
  echo "The 'tls' package for Tcl is not installed."
  echo "Please use 'apt-get install tcl-tls' (Linux)."
  exit 1
fi

if [ ! -x "$(command -v wget)" ] && [ ! -x "$(command -v curl)" ]; then
  echo "The programs 'wget' and/or 'curl' are apparently not installed."
  echo "Please use 'apt-get install wget' (Linux) or 'brew install wget' (Mac)."
90
91
92
93
94
95
96
97
98
99
100





101
102
103
104
105
106
107
108
109





110
111
112
113
114
115
116
88
89
90
91
92
93
94




95
96
97
98
99
100
101
102
103
104




105
106
107
108
109
110
111
112
113
114
115
116







-
-
-
-
+
+
+
+
+





-
-
-
-
+
+
+
+
+







PKGR_CLIENT_URI=https://urn.to/r/pkg_client_full
PKGR_TMP_FILE=${PKGR_TMP_DIR}/pkgrd_tmp_${PKGR_TMP_ID}_file.zip
PKGR_GET_OK=0

if [ -x "$(command -v wget)" ]; then
  for wgetArg in "" "--no-check-certificate"
  do
    wget -4 $wgetArg "--output-document=${PKGR_TMP_FILE}" "${PKGR_CLIENT_URI}"
    if [ $? -eq 0 ] && [ -f "${PKGR_TMP_FILE}" ]; then
      PKGR_GET_OK=1
      break
    if wget -4 $wgetArg "--output-document=${PKGR_TMP_FILE}" "${PKGR_CLIENT_URI}"; then
      if [ -f "${PKGR_TMP_FILE}" ]; then
        PKGR_GET_OK=1
        break
      fi
    fi
  done
else
  for curlArg in "" "--insecure"
  do
    curl -4 $curlArg --location "${PKGR_CLIENT_URI}" > "${PKGR_TMP_FILE}"
    if [ $? -eq 0 ] && [ -f "${PKGR_TMP_FILE}" ]; then
      PKGR_GET_OK=1
      break
    if curl -4 $curlArg --location "${PKGR_CLIENT_URI}" > "${PKGR_TMP_FILE}"; then
      if [ -f "${PKGR_TMP_FILE}" ]; then
        PKGR_GET_OK=1
        break
      fi
    fi
  done
fi

if [ $PKGR_GET_OK -eq 0 ] || [ ! -f "${PKGR_TMP_FILE}" ]; then
  echo "Could not download the package client toolset archive."
  exit 1