hosted mode create /var/lib/miaou-bash/semver_current
This commit is contained in:
+7
-4
@@ -96,13 +96,16 @@ function _pluralize_simple {
|
||||
|
||||
function fetch_distro_like {
|
||||
if grep -qE '^ID=debian|^ID_LIKE=debian' /etc/os-release; then
|
||||
echo debian
|
||||
DISTRO_LIKE=debian
|
||||
elif grep -qE '^ID=arch|^ID_LIKE=arch' /etc/os-release; then
|
||||
echo arch
|
||||
DISTRO_LIKE=arch
|
||||
else
|
||||
echo -n 'unsupported distro: '
|
||||
grep ^ID= /etc/os-release | cut -d= -f2
|
||||
local unsupported_distro
|
||||
unsupported_distro=$(grep ^ID= /etc/os-release | cut -d= -f2)
|
||||
>&2 echo -n "MIAOU ERROR: unsupported distro: $unsupported_distro"
|
||||
return 99
|
||||
fi
|
||||
export DISTRO_LIKE
|
||||
}
|
||||
|
||||
function _confirm_destructive {
|
||||
|
||||
Reference in New Issue
Block a user