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
echo"Unsupported distro! If your distro supports APT or DNF, please manually set os_name='Ubuntu' for apt, or os_name='Fedora' at the top of the file. Copy the appropriate command and replace the 'os_name=' with the proper command. You can also open an issue ticket."
28
-
echo"Stopped installation! Please remove ~/deps."
29
-
exit 1
24
+
# replace 'ubuntu' with 'debian' and 'rhel' with 'fedora' (among others)
25
+
# this has some weird issues on some distros where they list multiple possibilities
26
+
# https://github.com/which-distro/os-release/
27
+
[[ "$os_like"=~ [[:space:]]+ ]] && os_like=''
28
+
[[ "$os_like"!='' ]] && os_name="$os_like"
29
+
30
+
case"$os_name"in
31
+
'debian' | 'ubuntu' | 'linuxmint')
32
+
package_man='apt'
33
+
;;
34
+
'fedora')
35
+
case"$os_variant"in
36
+
'kinoite' | 'silverblue')
37
+
package_man='unsupported'
38
+
;;
39
+
*)
40
+
package_man='dnf'
41
+
;;
42
+
esac
43
+
;;
44
+
'arch')
45
+
package_man='unsupported'# for now
46
+
;;
47
+
*)
48
+
package_man="unknown"
49
+
;;
50
+
esac
51
+
52
+
# user override
53
+
if [[ "$PACKAGE_MANAGER"!="" ]] ;then
54
+
package_man="$PACKAGE_MANAGER"
30
55
fi
31
56
57
+
package_manager_text="Currently this script only supports apt and dnf, and it appears that your system is unsupported.
58
+
If you believe this is a mistake, please re-run this script with environmental variable 'PACKAGE_MANAGER=apt' or 'PACKAGE_MANAGER=dnf'.
0 commit comments