git
This commit is contained in:
commit
668d24cb7f
3
install.sh
Executable file
3
install.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
./programs/git.sh
|
11
programs/git.sh
Executable file
11
programs/git.sh
Executable 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
34
std.sh
Executable 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"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user