Add distro-specific, update "unsuppported" message
This commit is contained in:
parent
af69964db4
commit
29d500bfd5
5 changed files with 29 additions and 4 deletions
25
distro-specific.bash
Normal file
25
distro-specific.bash
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue