35 lines
571 B
Bash
Executable File
35 lines
571 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Intendet to be sourced
|
|
|
|
function info() {
|
|
echo "INFO: " $@
|
|
}
|
|
|
|
function verbose() {
|
|
if [[ -n "${DOTI_VERBOSE}" ]]; then
|
|
echo "VERBOSE: " $@
|
|
fi
|
|
}
|
|
|
|
function pacinstall() {
|
|
local program=$1
|
|
pacman -Q ${program} &> /dev/null
|
|
if [[ "$?" -ne "0" ]]; then
|
|
info "Installing ${program}"
|
|
sudo pacman -S --noconfirm ${program}
|
|
else
|
|
verbose "${program} already installed."
|
|
fi
|
|
}
|
|
|
|
function program_begin() {
|
|
local program=$1
|
|
info "Installing and configuring ${program}"
|
|
}
|
|
|
|
function program_end() {
|
|
local program=$1
|
|
verbose "${program} done"
|
|
}
|