archlinux support

This commit is contained in:
pvincent
2024-04-29 21:12:35 +04:00
parent 5bf228bb04
commit ea9c402a04
4 changed files with 54 additions and 14 deletions
+12
View File
@@ -18,6 +18,18 @@ function isArray {
[[ "$(declare -p "$1" 2>/dev/null)" =~ "declare -a" ]] || return 1
}
function isDebian {
grep ^ID=debian /etc/os-release
}
function isArch {
grep ^ID=arch /etc/os-release
}
function os-release {
grep ^ID= /etc/os-release | cut -d '=' -f2
}
function askConfirmation {
case "$1" in
y | Y | yes | YES)