-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdotnet.sh
More file actions
executable file
·53 lines (49 loc) · 1.4 KB
/
Copy pathdotnet.sh
File metadata and controls
executable file
·53 lines (49 loc) · 1.4 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# name: .NET SDK
# version: 1.0
# description: dotnet_desc
# icon: dotnet.svg
# compat: fedora, ostree, debian, ubuntu, ublue, rhel
# --- Start of the script code ---
source "$SCRIPT_DIR/libs/linuxtoys.lib"
_lang_
prep_tmp
sudo_rq
if _zenity_can_run; then
if mapfile -t _selected_ver < <(zenity --list \
--title=".NET SDK" \
--width=420 --height=320 \
--column="Selected" --column="Version" --column="Link" \
--hide-column=3 \
--print-column=2 \
--separator=$'\n' \
--checklist --multiple \
FALSE "10" "https://dotnet.microsoft.com/download/dotnet/10.0" \
FALSE "9" "https://dotnet.microsoft.com/download/dotnet/9.0" \
FALSE "8" "https://dotnet.microsoft.com/download/dotnet/8.0"); then
: # User selected versions
else
zenwrn "No version selected"
exit 100
fi
else
_selected_ver=(10 9 8)
fi
if is_debian; then
wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt update
fi
for version in "${_selected_ver[@]}"; do
if [ "$version" = "9" ] && is_ubuntu; then
sudo add-apt-repository ppa:dotnet/backports
sudo apt update
fi
case "$version" in
"8") pkg_install dotnet-sdk-8.0 ;;
"9") pkg_install dotnet-sdk-9.0 ;;
"10") pkg_install dotnet-sdk-10.0 ;;
esac
done
zeninf "$finishmsg"