added a setup script for installing zig and some other needed utilities.

This commit is contained in:
jakeg00dwin 2024-03-06 00:43:53 -08:00
parent e1b25a8c3b
commit 1bde660103
1 changed files with 53 additions and 0 deletions

53
scripts/setup.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/sh
# Author: Jake G
# Date: 2024
# Filename: setup.sh
# Description: Installs all the needed dependencies for this project.
DEBIAN=0
FBSD=0
DEV_UTILS="vim tmux fzf"
install_dev_utils () {
ICMD=""
if [ $DEBIAN -eq 1 ]; then
ICMD="sudo apt install"
elif [ $FBSD -eq 1 ]; then
ICMD="sudo pkg install"
fi
for util in $DEV_UTILS
do
${ICMD} ${util}
done
}
install_zig () {
if [ $DEBIAN -eq 1 ]; then
sudo apt install zig
elif [ $FBSD -eq 1 ]; then
sudo pkg install zig
fi
}
check_os () {
if [ -f /etc/debian_version ]; then
DEBIAN=1
elif [ -f /etc/freebsd-update.conf ]; then
FBSD=1
fi
}
setup () {
echo "Setting up env"
check_os
install_dev_utils
install_zig
}
setup