Skip to content

Commit 0d4f0a8

Browse files
Nyxnnyyxxxx
andauthored
Quote the remaining variables (#454)
Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
1 parent 1175f7d commit 0d4f0a8

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 @@ installAlacritty() {
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,14 +6,14 @@ setupDWM() {
66
printf "%b\n" "${YELLOW}Installing DWM-Titus if not already installed${RC}"
77
case "$PACKAGER" in # Install pre-Requisites
88
pacman)
9-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git
9+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git
1010
;;
1111
apt-get|nala)
12-
$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
12+
"$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
1313
;;
1414
dnf)
15-
$ESCALATION_TOOL "$PACKAGER" groupinstall -y "Development Tools"
16-
$ESCALATION_TOOL "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel
15+
"$ESCALATION_TOOL" "$PACKAGER" groupinstall -y "Development Tools"
16+
"$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel
1717
;;
1818
*)
1919
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
@@ -26,7 +26,7 @@ makeDWM() {
2626
cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
2727
# This path can be changed (e.g. to linux-toolbox directory)
2828
cd dwm-titus/ # Hardcoded path, maybe not the best.
29-
$ESCALATION_TOOL make clean install # Run make clean install
29+
"$ESCALATION_TOOL" make clean install # Run make clean install
3030
}
3131

3232
install_nerd_font() {
@@ -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
printf "%b\n" "${RED}Failed to install the built binary${RC}"
120120
return 1
121121
fi
@@ -179,13 +179,13 @@ setupDisplayManager() {
179179
printf "%b\n" "${YELLOW}Setting up Xorg${RC}"
180180
case "$PACKAGER" in
181181
pacman)
182-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
182+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
183183
;;
184184
apt-get|nala)
185-
$ESCALATION_TOOL "$PACKAGER" install -y xorg xinit
185+
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg xinit
186186
;;
187187
dnf)
188-
$ESCALATION_TOOL "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg
188+
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg
189189
;;
190190
*)
191191
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
@@ -207,13 +207,13 @@ setupDisplayManager() {
207207
printf "%b\n" "${YELLOW}No display manager found, installing $DM${RC}"
208208
case "$PACKAGER" in
209209
pacman)
210-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm "$DM"
210+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
211211
;;
212212
apt-get|nala)
213-
$ESCALATION_TOOL "$PACKAGER" install -y "$DM"
213+
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
214214
;;
215215
dnf)
216-
$ESCALATION_TOOL "$PACKAGER" install -y "$DM"
216+
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
217217
;;
218218
*)
219219
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
@@ -232,28 +232,28 @@ setupDisplayManager() {
232232
printf "%b\n" "${YELLOW}Configuring SDDM for autologin${RC}"
233233
SDDM_CONF="/etc/sddm.conf"
234234
if [ ! -f "$SDDM_CONF" ]; then
235-
echo "[Autologin]" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
236-
echo "User=$USER" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
237-
echo "Session=dwm" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
235+
echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
236+
echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
237+
echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
238238
else
239-
$ESCALATION_TOOL sed -i '/^\[Autologin\]/d' "$SDDM_CONF"
240-
$ESCALATION_TOOL sed -i '/^User=/d' "$SDDM_CONF"
241-
$ESCALATION_TOOL sed -i '/^Session=/d' "$SDDM_CONF"
242-
echo "[Autologin]" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
243-
echo "User=$USER" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
244-
echo "Session=dwm" | $ESCALATION_TOOL tee -a "$SDDM_CONF"
239+
"$ESCALATION_TOOL" sed -i '/^\[Autologin\]/d' "$SDDM_CONF"
240+
"$ESCALATION_TOOL" sed -i '/^User=/d' "$SDDM_CONF"
241+
"$ESCALATION_TOOL" sed -i '/^Session=/d' "$SDDM_CONF"
242+
echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
243+
echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
244+
echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF"
245245
fi
246246
printf "%b\n" "{YELLOW}Checking if autologin group exists${RC}"
247247
if ! getent group autologin > /dev/null; then
248248
printf "%b\n" "${YELLOW}Creating autologin group${RC}"
249-
$ESCALATION_TOOL groupadd autologin
249+
"$ESCALATION_TOOL" groupadd autologin
250250
else
251251
printf "%b\n" "${GREEN}Autologin group already exists${RC}"
252252
fi
253253
printf "%b\n" "${YELLOW}Adding user with UID 1000 to autologin group${RC}"
254254
USER_UID_1000=$(getent passwd 1000 | cut -d: -f1)
255255
if [ -n "$USER_UID_1000" ]; then
256-
$ESCALATION_TOOL usermod -aG autologin "$USER_UID_1000"
256+
"$ESCALATION_TOOL" usermod -aG autologin "$USER_UID_1000"
257257
printf "%b\n" "${GREEN}User $USER_UID_1000 added to autologin group${RC}"
258258
else
259259
printf "%b\n" "${RED}No user with UID 1000 found - Auto login not possible${RC}"
@@ -272,7 +272,7 @@ install_slstatus() {
272272
if [ "$response" = "y" ] || [ "$response" = "Y" ]; then
273273
printf "%b\n" "${YELLOW}Installing slstatus${RC}"
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
printf "%b\n" "${GREEN}slstatus installed successfully${RC}"
277277
else
278278
printf "%b\n" "${RED}Failed to install slstatus${RC}"

tabs/applications-setup/fastfetch-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ installFastfetch() {
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 @@ installKitty() {
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
@@ -8,16 +8,16 @@ installDepend() {
88
printf "%b\n" "${YELLOW}Installing Bash...${RC}"
99
case "$PACKAGER" in
1010
pacman)
11-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig git
11+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig git
1212
;;
1313
apt)
14-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
14+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
1515
;;
1616
dnf)
17-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
17+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
1818
;;
1919
zypper)
20-
$ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
20+
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
2121
;;
2222
*)
2323
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
printf "%b\n" "${GREEN}Fzf already installed${RC}"
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 @@ installNeovim() {
1717
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
1818
case "$PACKAGER" in
1919
pacman)
20-
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
20+
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
2121
;;
2222
apt)
23-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck git
23+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck git
2424
;;
2525
dnf)
26-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
26+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
2727
;;
2828
zypper)
29-
$ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
29+
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
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 @@ installRofi() {
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 @@ installZsh() {
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
@@ -44,7 +44,7 @@ RPROMPT='%F{15}(%F{166}%D{%H:%M}%F{15})%f'
4444
EOL
4545

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

5050
checkEnv

tabs/common-script.sh

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

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

3434
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" "${YELLOW}Using Chris Titus Recommended Firewall Rules${RC}"
2323

2424
printf "%b\n" "${YELLOW}Disabling UFW${RC}"
25-
$ESCALATION_TOOL ufw disable
25+
"$ESCALATION_TOOL" ufw disable
2626

2727
printf "%b\n" "${YELLOW}Limiting port 22/tcp (UFW)${RC}"
28-
$ESCALATION_TOOL ufw limit 22/tcp
28+
"$ESCALATION_TOOL" ufw limit 22/tcp
2929

3030
printf "%b\n" "${YELLOW}Allowing port 80/tcp (UFW)${RC}"
31-
$ESCALATION_TOOL ufw allow 80/tcp
31+
"$ESCALATION_TOOL" ufw allow 80/tcp
3232

3333
printf "%b\n" "${YELLO}Allowing port 443/tcp (UFW)${RC}"
34-
$ESCALATION_TOOL ufw allow 443/tcp
34+
"$ESCALATION_TOOL" ufw allow 443/tcp
3535

3636
printf "%b\n" "${YELLOW}Denying Incoming Packets by Default(UFW)${RC}"
37-
$ESCALATION_TOOL ufw default deny incoming
37+
"$ESCALATION_TOOL" ufw default deny incoming
3838

3939
printf "%b\n" "${YELLOW}Allowing Outcoming Packets by Default(UFW)${RC}"
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)