54 lines
813 B
Bash
Executable File
54 lines
813 B
Bash
Executable File
#!/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
|