Add git as a dependency for scripts that use it (#436)

* Add git as a dependency for scripts that use it

* apt -> apt|nala

* Refactor the remaining apt-gets and add nala to them

* Remove refactored apts from this PR

---------

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
Nyx 2024-09-18 14:38:36 -04:00 committed by GitHub
parent 0e1ee966ae
commit 075b54f5fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 38 deletions

View File

@ -2,21 +2,14 @@
. ../common-script.sh
makeDWM() {
cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
# This path can be changed (e.g. to linux-toolbox directory)
cd dwm-titus/ # Hardcoded path, maybe not the best.
$ESCALATION_TOOL make clean install # Run make clean install
}
setupDWM() {
printf "%b\n" "${YELLOW}Installing DWM-Titus if not already installed${RC}"
case "$PACKAGER" in # Install pre-Requisites
pacman)
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git
;;
apt-get|nala)
$ESCALATION_TOOL "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev
$ESCALATION_TOOL "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git
;;
dnf)
$ESCALATION_TOOL "$PACKAGER" groupinstall -y "Development Tools"
@ -29,6 +22,13 @@ setupDWM() {
esac
}
makeDWM() {
cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
# This path can be changed (e.g. to linux-toolbox directory)
cd dwm-titus/ # Hardcoded path, maybe not the best.
$ESCALATION_TOOL make clean install # Run make clean install
}
install_nerd_font() {
FONT_DIR="$HOME/.local/share/fonts"
FONT_ZIP="$FONT_DIR/Meslo.zip"
@ -292,4 +292,4 @@ makeDWM
install_slstatus
install_nerd_font
clone_config_folders
configure_backgrounds
configure_backgrounds

View File

@ -4,6 +4,28 @@
gitpath="$HOME/.local/share/mybash"
installDepend() {
printf "%b\n" "${YELLOW}Installing Bash...${RC}"
case "$PACKAGER" in
pacman)
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig git
;;
apt)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
;;
dnf)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
;;
zypper)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original mybash-setup-script.
exit 1
;;
esac
}
cloneMyBash() {
# Check if the dir exists before attempting to clone into it.
if [ -d "$gitpath" ]; then
@ -13,28 +35,6 @@ cloneMyBash() {
cd "$HOME" && git clone https://github.com/ChrisTitusTech/mybash.git "$gitpath"
}
installDepend() {
printf "%b\n" "${YELLOW}Installing Bash...${RC}"
case "$PACKAGER" in
pacman)
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig
;;
apt)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
;;
dnf)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
;;
zypper)
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
;;
*)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original mybash-setup-script.
exit 1
;;
esac
}
installFont() {
# Check to see if the MesloLGS Nerd Font is installed (Change this to whatever font you would like)
FONT_NAME="MesloLGS Nerd Font Mono"
@ -110,8 +110,8 @@ linkConfig() {
checkEnv
checkEscalationTool
cloneMyBash
installDepend
cloneMyBash
installFont
installStarshipAndFzf
installZoxide

View File

@ -17,16 +17,16 @@ installNeovim() {
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
case "$PACKAGER" in
pacman)
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
;;
apt)
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck git
;;
dnf)
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
zypper)
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original nvim-setup-script.
@ -51,7 +51,7 @@ linkNeovimConfig() {
checkEnv
checkEscalationTool
cloneNeovim
installNeovim
cloneNeovim
backupNeovimConfig
linkNeovimConfig