1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-16 07:26:51 +00:00

Add iscmd function and print CHANGELOG at the end

This commit is contained in:
Luna 2023-08-10 20:18:07 +02:00
parent a1d7e1c1b3
commit d92142c46e
2 changed files with 13 additions and 0 deletions

2
changelog.md Normal file
View file

@ -0,0 +1,2 @@
# fa3a08f
.tmux.conf moved to .config/tmux and deleted from $HOME

View file

@ -1,6 +1,10 @@
#!/usr/bin/env zsh
# env, because some OSes keep zsh in /bin (I'm looking at you, Alpine)
iscmd() {
command -v "$1" > /dev/null
}
for cmd in curl git sed install find; do
if ! command -v $cmd >/dev/null; then
echo "[!] $cmd not found"
@ -13,6 +17,12 @@ install() {
command install -Dv $@ | grep -v removed
}
if iscmd glow; then
CHANGELOG=$(glow changelog.md)
else
CHANGELOG=$(cat changelog.md)
fi
cp -v .zshrc $HOME
if [ ! -d "${HOME}/.oh-my-zsh" ]; then
echo "[*] Installing OMZsh"
@ -68,4 +78,5 @@ done
unfunction install
echo $CHANGELOG
exec zsh