1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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 [ $? -ne 0 ]; then
echo the "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)."
|
|
<
<
|
|
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
if ! echo "exit [catch {package require tls}]" | tclsh; then
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)."
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
PKGR_CLIENT_URI=https://urn.to/r/pkg_client_full
PKGR_TMP_FILE=pkgrd_tmp_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
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
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
|
|
|
|
|
>
|
|
|
|
>
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
PKGR_CLIENT_URI=https://urn.to/r/pkg_client_full
PKGR_TMP_FILE=pkgrd_tmp_file.zip
PKGR_GET_OK=0
if [ -x "$(command -v wget)" ]; then
for wgetArg in "" "--no-check-certificate"
do
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
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
|