This commit is contained in:
Robin Bärtschi 2025-07-05 16:49:14 +02:00
commit 668d24cb7f
3 changed files with 48 additions and 0 deletions

3
install.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
./programs/git.sh

11
programs/git.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
. "std.sh"
program_begin git
pacinstall git
git config --global init.defaultBranch main
git config --global user.email "robaertschi@proton.me"
git config --global user.name "Robin Bärtschi"
program_end git

34
std.sh Executable file
View File

@ -0,0 +1,34 @@
#!/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"
}