wip
This commit is contained in:
parent
d8afacabf9
commit
ae0b6646a0
1 changed files with 15 additions and 0 deletions
15
distros.sh
15
distros.sh
|
@ -1,3 +1,7 @@
|
|||
# INFO:
|
||||
# ╭──────────────────────────────╮
|
||||
# │ User variables and functions │
|
||||
# ╰──────────────────────────────╯
|
||||
distro=""
|
||||
ubuntu="false"
|
||||
debian="false"
|
||||
|
@ -38,6 +42,17 @@ silentexec() {
|
|||
"$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
checkAndInstall() {
|
||||
for deps in "$@"; do
|
||||
if ! command_exists $deps; then
|
||||
echo_note "$deps is not installed. Installing it now.."
|
||||
_install "$deps"
|
||||
else
|
||||
echo_note "skipping $deps - as it's already installed.."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# ─< Check if the user is root and set sudo variable if necessary >───────────────────────
|
||||
check_root() {
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue