Skip to content

Commit 3e48501

Browse files
author
nnyyxxxx
committed
Quote the remaining variables
1 parent d81e3af commit 3e48501

21 files changed

+148
-148
lines changed

tabs/applications-setup/alacritty-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ setupAlacritty() {
77
if ! command_exists alacritty; then
88
case ${PACKAGER} in
99
pacman)
10-
$ESCALATION_TOOL ${PACKAGER} -S --needed --noconfirm alacritty
10+
"$ESCALATION_TOOL" ${PACKAGER} -S --needed --noconfirm alacritty
1111
;;
1212
*)
13-
$ESCALATION_TOOL ${PACKAGER} install -y alacritty
13+
"$ESCALATION_TOOL" ${PACKAGER} install -y alacritty
1414
;;
1515
esac
1616
else

tabs/applications-setup/dwmtitus-setup.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ makeDWM() {
66
cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
77
# This path can be changed (e.g. to linux-toolbox directory)
88
cd dwm-titus/ # Hardcoded path, maybe not the best.
9-
$ESCALATION_TOOL make clean install # Run make clean install
9+
"$ESCALATION_TOOL" make clean install # Run make clean install
1010
}
1111

1212
setupDWM() {
1313
echo "Installing DWM-Titus if not already installed"
1414
case "$PACKAGER" in # Install pre-Requisites
1515
pacman)
16-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb
16+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb
1717
;;
1818
apt-get|nala)
19-
$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
19+
"$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
2020
;;
2121
dnf)
22-
$ESCALATION_TOOL "$PACKAGER" groupinstall -y "Development Tools"
23-
$ESCALATION_TOOL "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel
22+
"$ESCALATION_TOOL" "$PACKAGER" groupinstall -y "Development Tools"
23+
"$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel
2424
;;
2525
*)
2626
echo "Unsupported package manager: $PACKAGER"
@@ -115,7 +115,7 @@ picom_animations() {
115115
fi
116116

117117
# Install the built binary
118-
if ! $ESCALATION_TOOL ninja -C build install; then
118+
if ! "$ESCALATION_TOOL" ninja -C build install; then
119119
echo "Failed to install the built binary"
120120
return 1
121121
fi
@@ -176,13 +176,13 @@ setupDisplayManager() {
176176
echo "Setting up Xorg"
177177
case "$PACKAGER" in
178178
pacman)
179-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
179+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
180180
;;
181181
apt-get|nala)
182-
$ESCALATION_TOOL "$PACKAGER" install -y xorg xinit
182+
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg xinit
183183
;;
184184
dnf)
185-
$ESCALATION_TOOL "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg
185+
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg
186186
;;
187187
*)
188188
echo "Unsupported package manager: $PACKAGER"
@@ -204,13 +204,13 @@ setupDisplayManager() {
204204
echo "No display manager found, installing $DM"
205205
case "$PACKAGER" in
206206
pacman)
207-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm "$DM"
207+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
208208
;;
209209
apt-get|nala)
210-
$ESCALATION_TOOL "$PACKAGER" install -y "$DM"
210+
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
211211
;;
212212
dnf)
213-
$ESCALATION_TOOL "$PACKAGER" install -y "$DM"
213+
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
214214
;;
215215
*)
216216
echo "Unsupported package manager: $PACKAGER"
@@ -229,28 +229,28 @@ setupDisplayManager() {
229229
echo "Configuring SDDM for autologin"
230230
SDDM_CONF="/etc/sddm.conf"
231231
if [ ! -f "$SDDM_CONF" ]; then
232-
echo "[Autologin]" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
233-
echo "User=$USER" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
234-
echo "Session=dwm" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
232+
echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
233+
echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
234+
echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
235235
else
236-
$ESCALATION_TOOL sed -i '/^\[Autologin\]/d' "$SDDM_CONF"
237-
$ESCALATION_TOOL sed -i '/^User=/d' "$SDDM_CONF"
238-
$ESCALATION_TOOL sed -i '/^Session=/d' "$SDDM_CONF"
239-
echo "[Autologin]" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
240-
echo "User=$USER" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
241-
echo "Session=dwm" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
236+
"$ESCALATION_TOOL" sed -i '/^\[Autologin\]/d' "$SDDM_CONF"
237+
"$ESCALATION_TOOL" sed -i '/^User=/d' "$SDDM_CONF"
238+
"$ESCALATION_TOOL" sed -i '/^Session=/d' "$SDDM_CONF"
239+
echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
240+
echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
241+
echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
242242
fi
243243
echo "Checking if autologin group exists"
244244
if ! getent group autologin > /dev/null; then
245245
echo "Creating autologin group"
246-
$ESCALATION_TOOL groupadd autologin
246+
"$ESCALATION_TOOL" groupadd autologin
247247
else
248248
echo "Autologin group already exists"
249249
fi
250250
echo "Adding user with UID 1000 to autologin group"
251251
USER_UID_1000=$(getent passwd 1000 | cut -d: -f1)
252252
if [ -n "$USER_UID_1000" ]; then
253-
$ESCALATION_TOOL usermod -aG autologin "$USER_UID_1000"
253+
"$ESCALATION_TOOL" usermod -aG autologin "$USER_UID_1000"
254254
echo "User $USER_UID_1000 added to autologin group"
255255
else
256256
echo "No user with UID 1000 found - Auto login not possible"
@@ -272,7 +272,7 @@ install_slstatus() {
272272
if [ "$response" = "y" ] || [ "$response" = "Y" ]; then
273273
echo "Installing slstatus"
274274
cd "$HOME/dwm-titus/slstatus" || { echo "Failed to change directory to slstatus"; return 1; }
275-
if $ESCALATION_TOOL make clean install; then
275+
if "$ESCALATION_TOOL" make clean install; then
276276
echo "slstatus installed successfully"
277277
else
278278
echo "Failed to install slstatus"

tabs/applications-setup/fastfetch-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ setupFastfetch() {
77
if ! command_exists fastfetch; then
88
case ${PACKAGER} in
99
pacman)
10-
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm fastfetch
10+
"$ESCALATION_TOOL" "${PACKAGER}" -S --needed --noconfirm fastfetch
1111
;;
1212
*)
13-
$ESCALATION_TOOL "${PACKAGER}" install -y fastfetch
13+
"$ESCALATION_TOOL" "${PACKAGER}" install -y fastfetch
1414
;;
1515
esac
1616
else

tabs/applications-setup/kitty-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ setupKitty() {
77
if ! command_exists kitty; then
88
case ${PACKAGER} in
99
pacman)
10-
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm kitty
10+
"$ESCALATION_TOOL" "${PACKAGER}" -S --needed --noconfirm kitty
1111
;;
1212
*)
13-
$ESCALATION_TOOL "${PACKAGER}" install -y kitty
13+
"$ESCALATION_TOOL" "${PACKAGER}" install -y kitty
1414
;;
1515
esac
1616
else

tabs/applications-setup/mybash-setup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ installDepend() {
1717
echo "Install mybash if not already installed"
1818
case "$PACKAGER" in
1919
pacman)
20-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig
20+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig
2121
;;
2222
apt)
23-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
23+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
2424
;;
2525
dnf)
26-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
26+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
2727
;;
2828
zypper)
29-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
29+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig
3030
;;
3131
*)
3232
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original mybash-setup-script.
@@ -70,7 +70,7 @@ installStarshipAndFzf() {
7070
echo "Fzf already installed"
7171
else
7272
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
73-
$ESCALATION_TOOL ~/.fzf/install
73+
"$ESCALATION_TOOL" ~/.fzf/install
7474
fi
7575
}
7676

tabs/applications-setup/neovim-setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ setupNeovim() {
1717
echo "Install Neovim if not already installed"
1818
case "$PACKAGER" in
1919
pacman)
20-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck
20+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck
2121
;;
2222
apt)
23-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck
23+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck
2424
;;
2525
dnf)
26-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
26+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
2727
;;
2828
zypper)
29-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
29+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck
3030
;;
3131
*)
3232
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original nvim-setup-script.

tabs/applications-setup/rofi-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ setupRofi() {
77
if ! command_exists rofi; then
88
case "$PACKAGER" in
99
pacman)
10-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm rofi
10+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rofi
1111
;;
1212
*)
13-
$ESCALATION_TOOL "$PACKAGER" install -y rofi
13+
"$ESCALATION_TOOL" "$PACKAGER" install -y rofi
1414
;;
1515
esac
1616
else

tabs/applications-setup/zsh-setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ install_zsh() {
88
if ! command_exists zsh; then
99
case "$PACKAGER" in
1010
pacman)
11-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm zsh
11+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm zsh
1212
;;
1313
*)
14-
$ESCALATION_TOOL "$PACKAGER" install -y zsh
14+
"$ESCALATION_TOOL" "$PACKAGER" install -y zsh
1515
;;
1616
esac
1717
else
@@ -43,7 +43,7 @@ RPROMPT='%F{15}(%F{166}%D{%H:%M}%F{15})%f'
4343
EOL
4444

4545
# Ensure /etc/zsh/zshenv sets ZDOTDIR to the user's config directory
46-
echo 'export ZDOTDIR="$HOME/.config/zsh"' | $ESCALATION_TOOL tee -a /etc/zsh/zshenv
46+
echo 'export ZDOTDIR="$HOME/.config/zsh"' | "$ESCALATION_TOOL" tee -a /etc/zsh/zshenv
4747
}
4848

4949
checkEnv

tabs/common-script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ checkAURHelper() {
2626
done
2727

2828
echo "Installing yay as AUR helper..."
29-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel
30-
cd /opt && $ESCALATION_TOOL git clone https://aur.archlinux.org/yay-git.git && $ESCALATION_TOOL chown -R "$USER":"$USER" ./yay-git
29+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel
30+
cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-git.git && "$ESCALATION_TOOL" chown -R "$USER":"$USER" ./yay-git
3131
cd yay-git && makepkg --noconfirm -si
3232

3333
if command_exists yay; then

tabs/security/firewall-baselines.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ installPkg() {
77
if ! command_exists ufw; then
88
case ${PACKAGER} in
99
pacman)
10-
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm ufw
10+
"$ESCALATION_TOOL" "${PACKAGER}" -S --needed --noconfirm ufw
1111
;;
1212
*)
13-
$ESCALATION_TOOL "${PACKAGER}" install -y ufw
13+
"$ESCALATION_TOOL" "${PACKAGER}" install -y ufw
1414
;;
1515
esac
1616
else
@@ -22,24 +22,24 @@ configureUFW() {
2222
printf "%b\n" "${GREEN}Using Chris Titus Recommended Firewall Rules${RC}"
2323

2424
echo "Disabling UFW"
25-
$ESCALATION_TOOL ufw disable
25+
"$ESCALATION_TOOL" ufw disable
2626

2727
echo "Limiting port 22/tcp (UFW)"
28-
$ESCALATION_TOOL ufw limit 22/tcp
28+
"$ESCALATION_TOOL" ufw limit 22/tcp
2929

3030
echo "Allowing port 80/tcp (UFW)"
31-
$ESCALATION_TOOL ufw allow 80/tcp
31+
"$ESCALATION_TOOL" ufw allow 80/tcp
3232

3333
echo "Allowing port 443/tcp (UFW)"
34-
$ESCALATION_TOOL ufw allow 443/tcp
34+
"$ESCALATION_TOOL" ufw allow 443/tcp
3535

3636
echo "Denying Incoming Packets by Default(UFW)"
37-
$ESCALATION_TOOL ufw default deny incoming
37+
"$ESCALATION_TOOL" ufw default deny incoming
3838

3939
echo "Allowing Outcoming Packets by Default(UFW)"
40-
$ESCALATION_TOOL ufw default allow outgoing
40+
"$ESCALATION_TOOL" ufw default allow outgoing
4141

42-
$ESCALATION_TOOL ufw enable
42+
"$ESCALATION_TOOL" ufw enable
4343
printf "%b\n" "${GREEN}Enabled Firewall with Baselines!${RC}"
4444
}
4545

0 commit comments

Comments
 (0)