Add distro-specific, update "unsuppported" message

This commit is contained in:
askiiart 2023-09-06 20:54:23 -05:00
parent af69964db4
commit 29d500bfd5
No known key found for this signature in database
GPG key ID: 85505F3A2264FA01
5 changed files with 29 additions and 4 deletions

25
distro-specific.bash Normal file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e
if [ $(whoami) == "root" ]; then
echo "Run as a normal user, not root"
exit 1
fi
command_exists() { type "$1" &>/dev/null; }
if command_exists "apt-get"; then
;
elif command_exists "yum"; then
;
elif command_exists "pacman"; then
;
elif command_exists "zypp"; then
# Untested
;
elif command_exists "emerge"; then
;
elif command_exists "apk"; then
;
else
echo "Unsupported: unknown package manager and distro"
fi