Skip to content

Commit

Permalink
Fixed with shellcheck.net.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypass96 committed Jan 6, 2025
1 parent f23eac8 commit a8e2686
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 77 deletions.
8 changes: 4 additions & 4 deletions aurora_post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ rpm-ostree install papirus-icon-theme

# Install the Vimix KDE theme.
rpm-ostree install kvantum
git clone https://github.com/vinceliuice/Vimix-kde.git $HOME/Vimix-kde
cd $HOME/Vimix-kde
git clone https://github.com/vinceliuice/Vimix-kde.git "$HOME"/Vimix-kde
cd "$HOME"/Vimix-kde || exit
./install.sh -t doder
# Cleanup
cd $HOME
cd "$HOME" || exit
rm -rf Vimix-kde

# Remove Firefox and other junk.
Expand All @@ -20,7 +20,7 @@ flatpak uninstall -y org.mozilla.firefox org.fedoraproject.MediaWriter org.kde.h
flatpak install -y com.brave.Browser com.vscodium.codium

# Configure VSCodium.
mkdir -p $HOME/.var/app/com.vscodium.codium/config/VSCodium/User && cp -v $HOME/linux-stuff/Dotfiles/config/VSCodium/User/settings.json $HOME/.var/app/com.vscodium.codium/config/VSCodium/User/settings.json
mkdir -p "$HOME"/.var/app/com.vscodium.codium/config/VSCodium/User && cp -v "$HOME"/linux-stuff/Dotfiles/config/VSCodium/User/settings.json "$HOME"/.var/app/com.vscodium.codium/config/VSCodium/User/settings.json
flatpak run com.vscodium.codium --install-extension qyurila.ayu-midas
flatpak run com.vscodium.codium --install-extension jeff-hykin.better-shellscript-syntax
flatpak run com.vscodium.codium --install-extension file-icons.file-icons
Expand Down
6 changes: 3 additions & 3 deletions bat-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ echo '--map-syntax "config:INI"' >> "$HOME/.config/bat/config"

# Copy the user configuration to /etc/skel so new users get the same setup.
sudo mkdir -p /etc/skel/.config/bat
sudo cp -v $HOME/.config/bat/config /etc/skel/.config/bat/
sudo cp -v "$HOME"/.config/bat/config /etc/skel/.config/bat/

# Copy the user configuration to root's configuration.
sudo mkdir -p /root/.config/bat
sudo cp -v $HOME/.config/bat/config /root/.config/bat/
sudo cp -v "$HOME"/.config/bat/config /root/.config/bat/

echo "Bat syntax highlighter has been configured with the OneHalfDark theme for both your user and root."
cd $HOME
cd "$HOME" || exit
4 changes: 2 additions & 2 deletions create_swapfile_void.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CYAN='\033[1;36m'
NC='\033[0m' # No color

# Checking to see if we're running as root.
if [ $(id -u) -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
echo -e "${RED}Please run this script as root via 'su'! Thanks.${NC}"
exit
fi
Expand Down Expand Up @@ -67,4 +67,4 @@ fi
if ! grep -q '/swapfile' /etc/fstab; then
echo_warning "Adding swapfile entry to /etc/fstab..."
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
fi
fi
8 changes: 4 additions & 4 deletions debian_linux-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script will clean up and optimize a Debian Xfce (rolling - Sid) installation.

# Audio buzz/hum fix.
Expand Down Expand Up @@ -36,10 +36,10 @@ clear

# Install OneHalf-Dark theme for Xfce terminal.
sudo mkdir -p /etc/skel/.local/share/xfce4/terminal/colorschemes
cd $HOME && curl https://raw.githubusercontent.com/sonph/onehalf/master/xfce4-terminal/OneHalfDark.theme -o OneHalfDark.theme
mkdir -p $HOME/.local/share/xfce4/terminal/colorschemes
cd "$HOME" && curl https://raw.githubusercontent.com/sonph/onehalf/master/xfce4-terminal/OneHalfDark.theme -o OneHalfDark.theme
mkdir -p "$HOME"/.local/share/xfce4/terminal/colorschemes
cp -v OneHalfDark.theme /etc/skel/.local/share/xfce4/terminal/colorschemes
cp -v OneHalfDark.theme $HOME/.local/share/xfce4/terminal/colorschemes
cp -v OneHalfDark.theme "$HOME"/.local/share/xfce4/terminal/colorschemes

clear

Expand Down
4 changes: 2 additions & 2 deletions enable-sddm-void.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Simple one-liner script to enable and start SDDM after a Void Linux install.

# Checking to see if we're running as root.
if [ $(id -u) -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root via 'sudo'! Thanks."
exit
fi

ln -s /etc/sv/sddm /var/service/sddm
ln -s /etc/sv/sddm /var/service/sddm
10 changes: 5 additions & 5 deletions fastfetch-setup.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

# Create directory if it doesn't exist
mkdir -p $HOME/.config/fastfetch
mkdir -p "$HOME"/.config/fastfetch

# Copy config file to user's config directory
cp -v $HOME/linux-stuff/Dotfiles/config/fastfetch/config.jsonc $HOME/.config/fastfetch/config.jsonc
cp -v "$HOME"/linux-stuff/Dotfiles/config/fastfetch/config.jsonc "$HOME"/.config/fastfetch/config.jsonc

# Set ownership for the user
chown -R $USER:$USER $HOME/.config/fastfetch
chown -R "$USER":"$USER" "$HOME"/.config/fastfetch

# Copy config file to system-wide skel directory
sudo mkdir -p /etc/skel/.config/fastfetch
sudo cp -v $HOME/.config/fastfetch/config.jsonc /etc/skel/.config/fastfetch/
sudo cp -v "$HOME"/.config/fastfetch/config.jsonc /etc/skel/.config/fastfetch/

# Copy config file to root's config directory
sudo mkdir -p /root/.config/fastfetch
sudo cp -v /etc/skel/.config/fastfetch/config.jsonc /root/.config/fastfetch/
sudo cp -v /etc/skel/.config/fastfetch/config.jsonc /root/.config/fastfetch/
13 changes: 7 additions & 6 deletions fedora-kde-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This shell script cleans up a Fedora KDE spin and removes unnecessary bloatware included with the operating system.

# Checking to see if we're running as root.
if [ $(id -u) -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root! Thanks."
exit
fi
Expand All @@ -28,7 +28,7 @@ dnf update -y
clear

# Add RPMFusion repositories.
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm

clear

Expand Down Expand Up @@ -95,15 +95,15 @@ dnf install -y fastfetch
clear

# Download Konsole colors.
read -p "Which Konsole colorscheme do you want?
read -rp "Which Konsole colorscheme do you want?
1. Catppuccin
2. OneHalf-Dark
3. Ayu Mirage
-> " $resp
-> " resp
if [ "$resp" = 1 ]; then
cd && git clone https://github.com/catppuccin/konsole.git
cp -v konsole/*.colorscheme /usr/share/konsole
chown -R $USER:$USER /usr/share/konsole/Catppuccin-*.colorscheme
chown -R "$USER:$USER" /usr/share/konsole/Catppuccin-*.colorscheme
rm -rf konsole
elif [ "$resp" = 2 ]; then
wget https://raw.githubusercontent.com/sonph/onehalf/master/konsole/onehalf-dark.colorscheme
Expand All @@ -116,6 +116,7 @@ elif [ "$resp" = 3 ]; then
chmod 755 /usr/share/konsole
mv AyuMirage.colorscheme /usr/share/konsole
chmod 644 /usr/share/konsole/AyuMirage.colorscheme
fi
clear

# Install the Poppins font.
Expand Down Expand Up @@ -228,4 +229,4 @@ clear
sed -i 's/#Storage=auto/Storage=volatile/' /etc/systemd/journald.conf
sed -i 's/#SystemMaxFileSize=/SystemMaxFileSize=20MB/' /etc/systemd/journald.conf

echo "Cleanup and optimization complete."
echo "Cleanup and optimization complete."
12 changes: 6 additions & 6 deletions lsd-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
CONFIG_DIR=$HOME/.config/lsd

# Create directory structure
mkdir -p $CONFIG_DIR
mkdir -p "$CONFIG_DIR"
sudo mkdir -p /etc/skel/.config/lsd
sudo mkdir -p /root/.config/lsd

# Copy config file
cp -v $HOME/linux-stuff/Dotfiles/config/lsd/config.yaml $CONFIG_DIR
sudo cp -v $CONFIG_DIR/config.yaml /etc/skel/.config/lsd/
sudo cp -v $CONFIG_DIR/config.yaml /root/.config/lsd/
cp -v "$HOME"/linux-stuff/Dotfiles/config/lsd/config.yaml "$CONFIG_DIR"
sudo cp -v "$CONFIG_DIR"/config.yaml /etc/skel/.config/lsd/
sudo cp -v "$CONFIG_DIR"/config.yaml /root/.config/lsd/

# Set correct ownership
chown -R $USER:$USER $CONFIG_DIR
chown -R "$USER":"$USER" "$CONFIG_DIR"

echo "lsd configuration has been set up."
echo "lsd configuration has been set up."
22 changes: 11 additions & 11 deletions micro-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ SCHEME_NAMES=("catppuccin-latte" "catppuccin-frappe" "catppuccin-macchiato" "cat
# Function to copy settings and color scheme
copy_settings_and_colors() {
# Create directory structure
mkdir -p $CONFIG_DIR
mkdir -p "$CONFIG_DIR"
sudo mkdir -p /etc/skel/.config/micro
sudo mkdir -p /root/.config/micro

# Copy settings file
cp -v $HOME/linux-stuff/Dotfiles/config/micro/settings.json $CONFIG_DIR/settings.json
sudo cp -v $CONFIG_DIR/settings.json /etc/skel/.config/micro/
sudo cp -v $CONFIG_DIR/settings.json /root/.config/micro/
cp -v "$HOME"/linux-stuff/Dotfiles/config/micro/settings.json "$CONFIG_DIR"/settings.json
sudo cp -v "$CONFIG_DIR"/settings.json /etc/skel/.config/micro/
sudo cp -v "$CONFIG_DIR"/settings.json /root/.config/micro/

# Set correct ownership
chown -R $USER:$USER $CONFIG_DIR
chown -R "$USER":"$USER" "$CONFIG_DIR"

# Setup Catppuccin colors
# Change to the user's home directory and clone Catppuccino colorscheme repository
cd $HOME && git clone https://github.com/catppuccin/micro.git
cd "$HOME" && git clone https://github.com/catppuccin/micro.git

# Set up colorschemes directories
mkdir -p $CONFIG_DIR/colorschemes
mkdir -p "$CONFIG_DIR"/colorschemes
sudo mkdir -p /etc/skel/.config/micro/colorschemes
sudo mkdir -p /root/.config/micro/colorschemes

# Copy colorscheme files
cp -v micro/src/*.micro $CONFIG_DIR/colorschemes
cp -v micro/src/*.micro "$CONFIG_DIR"/colorschemes
sudo cp -v micro/src/*.micro /etc/skel/.config/micro/colorschemes
sudo cp -v micro/src/*.micro /root/.config/micro/colorschemes

Expand All @@ -40,7 +40,7 @@ copy_settings_and_colors() {
micro -plugin install quoter wc detectindent aspell

# Update color scheme in settings
sed -i "s/\"colorscheme\": \"[^\"]*\"/\"colorscheme\": \"$selected_scheme\"/" $CONFIG_DIR/settings.json
sed -i "s/\"colorscheme\": \"[^\"]*\"/\"colorscheme\": \"$selected_scheme\"/" "$CONFIG_DIR"/settings.json

echo "Micro text editor configuration has been set up with the \"$selected_scheme\" color scheme."
}
Expand All @@ -52,7 +52,7 @@ for ((i=0; i<${#COLOR_SCHEMES[@]}; i++)); do
done

default_choice="Catppuccin Mocha"
read -p "Choose a color scheme (1-${#COLOR_SCHEMES[@]}, default: $default_choice): " choice
read -rp "Choose a color scheme (1-${#COLOR_SCHEMES[@]}, default: $default_choice): " choice
choice="${choice:-$default_choice}"

# Find selected scheme
Expand All @@ -69,4 +69,4 @@ if [ -z "$selected_scheme" ]; then
selected_scheme="${SCHEME_NAMES[3]}"
fi

copy_settings_and_colors
copy_settings_and_colors
6 changes: 3 additions & 3 deletions purge_pacnew.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Checking to see if we're running as root.
if [ $(id -u) -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root via 'su' or 'sudo'! Thanks."
exit
fi
Expand Down Expand Up @@ -29,7 +29,7 @@ bold_yellow="\e[1;33m"
reset="\e[0m"
# Search the pacman log for recent warnings about .pacnew files
log_pacnew=$(grep -P 'warning: .*\.pacnew' /var/log/pacman.log | tail -n 10)
log_pacnew=$(grep -P "warning: .*\.pacnew" /var/log/pacman.log | tail -n 10)
# Verify if .pacnew files exist on the system
system_pacnew=$(fd -e pacnew . /etc)
Expand Down Expand Up @@ -58,4 +58,4 @@ chmod 644 "$HOOK_DIR/check_pacnew.hook"
chmod 744 "$DEST_DIR/purge_pacnew"
chmod 744 "$DEST_DIR/check_pacnew"

echo "Installation complete. You can now use the $DEST_DIR/purge_pacnew and $DEST_DIR/check_pacnew scripts and the $HOOK_DIR/check_pacnew pacman post-install hook."
echo "Installation complete. You can now use the $DEST_DIR/purge_pacnew and $DEST_DIR/check_pacnew scripts and the $HOOK_DIR/check_pacnew pacman post-install hook."
4 changes: 2 additions & 2 deletions restore_pacsave.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Checking to see if we're running as root.
if [ $(id -u) -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root via 'su' or 'sudo'! Thanks."
exit
fi
Expand Down Expand Up @@ -62,4 +62,4 @@ chmod 644 "$HOOK_DIR/restore_pacsave.hook"
# Make the script executable and fix permissions.
chmod 744 "$DEST_DIR/restore_pacsave"

echo "Installation complete. You can now use the $DEST_DIR/restore_pacsave script and the $HOOK_DIR/restore_pacsave pacman post-install hook."
echo "Installation complete. You can now use the $DEST_DIR/restore_pacsave script and the $HOOK_DIR/restore_pacsave pacman post-install hook."
5 changes: 3 additions & 2 deletions siduction_linux-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script will clean up and optimize a Siduction KDE (Debian-based rolling release distribution) installation.

# Define color codes
Expand Down Expand Up @@ -232,4 +232,5 @@ curl -s 'https://liquorix.net/install-liquorix.sh' | sudo bash
if [ $? -eq 0 ]; then
echo -e "${GREEN}Liquorix kernel installed successfully.${NC}"
else
echo -e "${RED}Failed to install Liquorix kernel.${NC}"
echo -e "${RED}Failed to install Liquorix kernel.${NC}"
fi
Loading

0 comments on commit a8e2686

Please sign in to comment.