You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _scripts/install.sh
+25-1Lines changed: 25 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,28 @@ function clean_before_exit {
33
33
trap clean_before_exit EXIT
34
34
init_arch
35
35
36
+
urlencode() {
37
+
# urlencode <string>
38
+
39
+
old_lang=$LANG
40
+
LANG=C
41
+
42
+
old_lc_collate=$LC_COLLATE
43
+
LC_COLLATE=C
44
+
45
+
local length="${#1}"
46
+
for(( i =0; i < length; i++));do
47
+
local c="${1:i:1}"
48
+
case$cin
49
+
[a-zA-Z0-9.~_-]) printf"$c" ;;
50
+
*) printf'%%%02X'"'$c" ;;
51
+
esac
52
+
done
53
+
54
+
LANG=$old_lang
55
+
LC_COLLATE=$old_lc_collate
56
+
}
57
+
36
58
functioninstall_helm {
37
59
if [[ "${INSTALL_DRYCC_MIRROR}"=="cn" ]] ;then
38
60
version=$(curl -Ls https://github.com/helm/helm/releases|grep /helm/helm/releases/tag/ | sed -E 's/.*\/helm\/helm\/releases\/tag\/(v[0-9\.]{1,}(-rc.[0-9]{1,})?)".*/\1/g'| head -1)
@@ -171,8 +193,10 @@ function configure_mirrors {
171
193
fi
172
194
if [ -z"${INSTALL_K3S_VERSION}" ];then
173
195
INSTALL_K3S_VERSION=$(curl -Ls "$K3S_RELEASE_URL"| grep /k3s-io/k3s/releases/tag/ | sed -E 's/.*\/k3s-io\/k3s\/releases\/tag\/(v[0-9\.]{1,}[rc0-9\-]{0,}%2Bk3s[0-9])".*/\1/g'| head -1)
0 commit comments