shellcheck verification

This commit is contained in:
Mylloon 2022-02-15 09:26:55 +01:00
parent 83853faf0e
commit 2467aa7530
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
23 changed files with 91 additions and 45 deletions

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
sudo apt install apt-transport-https curl -y
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
sudo apt update
sudo apt install gnome-shell-extension-gpaste gnome-shell-extension-prefs -y

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bash
# Fetch installation script
wget -q https://raw.githubusercontent.com/GaZaTu/x11-emoji-picker/master/install.sh -O /tmp/install_EP.sh
# Remove the great emoji after the installation
sed -i 's/echo "$PROJECT_NAME installed! 🎉"/echo "$PROJECT_NAME installed!"/' /tmp/install_EP.sh
sed -i "s/echo \"$PROJECT_NAME installed! 🎉\"/echo \"$PROJECT_NAME installed!\"/" /tmp/install_EP.sh
# Installation
yes | bash /tmp/install_EP.sh
@ -15,7 +17,7 @@ then
fi
# Use custom configuration
rm $HOME/.config/gazatu.xyz/emoji-picker.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P $HOME/.config/gazatu.xyz/
rm "$HOME"/.config/gazatu.xyz/emoji-picker.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P "$HOME"/.config/gazatu.xyz/
echo -e "\nEmoji Picker configured! 🎉"

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Adds the official Fish repository
sudo apt-add-repository ppa:fish-shell/release-3 -y
@ -9,7 +11,7 @@ sudo apt install fish fzf bat procps curl exa -y
echo -e "\nFish installed!"
# Fish default shell
sudo chsh -s /usr/bin/fish $USER
sudo chsh -s /usr/bin/fish "$USER"
# Removing motd
fish -c 'set -U fish_greeting'
@ -19,13 +21,13 @@ curl -sL https://git.io/fisher | fish -c 'source && fisher install jorgebucaran/
fish -c 'fisher install jethrokuan/fzf'
# Install SSH
rm $HOME/.config/fish/functions/fish_ssh_agent.fish 2>/dev/null; wget https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P $HOME/.config/fish/functions/
rm "$HOME"/.config/fish/functions/fish_ssh_agent.fish 2>/dev/null; wget https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
# Update the fish config with mine (edit that once installed for you)
rm $HOME/.config/fish/config.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/config.fish -P $HOME/.config/fish/
rm "$HOME"/.config/fish/config.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/config.fish -P "$HOME"/.config/fish/
# Update the prompt with mine
rm $HOME/.config/fish/functions/fish_prompt.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/functions/fish_prompt.fish -P $HOME/.config/fish/functions/
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
# Updating color scheme (based on Base16 Eighties)
fish -c 'set -U fish_color_normal normal'

View file

@ -1,11 +1,13 @@
#!/usr/bin/env bash
# Install flameshot
sudo apt update
sudo apt install flameshot -y
echo -e "\nFlameshot installed!"
# Apply custom configuration
rm $HOME/.config/flameshot/flameshot.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/flameshot/flameshot.ini -P $HOME/.config/flameshot/
rm "$HOME"/.config/flameshot/flameshot.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
# Remove old shortcut assign with the Print key
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot "[]"

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Latest version
# No available version for latest Ubuntu version
# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
if grep "Ubuntu" /proc/version > /dev/null || grep "WSL" /proc/version > /dev/null;
then
# Update of APT
@ -7,7 +9,7 @@ then
which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed
git clone -c http.sslverify=false https://git.kennel.ml/Anri/myLinuxConfiguration.git
cd myLinuxConfiguration
cd myLinuxConfiguration || exit
# Upgrade and clean already installed packages
sudo apt upgrade -y

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Install SDKMAN
# Install dependencies
sudo apt update
@ -6,8 +8,8 @@ curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
# Adding Fish support if fish is installed
if [ -x $HOME/.config/fish ] ; then
if [ ! -f $HOME/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
if [ -x "$HOME"/.config/fish ] ; then
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
curl -sL https://git.io/fisher | fish -c 'source && fisher install jorgebucaran/fisher'
fi
fish -c 'fisher install reitzig/sdkman-for-fish'

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Install
sudo snap install kolourpaint

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Install Latex
sudo apt update
sudo apt install texlive-full python3-pygments -y
@ -11,7 +13,7 @@ then
apps=("display-im6.q16" "prerex" "vprerex" "texdoctk" "info")
# We remove the Ubuntu desktop shortcut only if it already exists
for app in ${apps[@]}
for app in "${apps[@]}"
do
if [ -f $pathicons/$app.desktop ]
then

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Fetching a link to get the latest version of MultiMC
echo "Retrieve the last package..."
latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # retrieving for the official website
@ -5,7 +7,7 @@ pat='href="(.*)" ' # regex
[[ $latest =~ $pat ]] # Use of REGEX
# Download the latest package
wget -q --show-progress -i ${BASH_REMATCH[1]} -O MultiMC.deb
wget -q --show-progress -i "${BASH_REMATCH[1]}" -O MultiMC.deb
sudo apt install ./MultiMC.deb -y
rm MultiMC.deb

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Add repo
sudo add-apt-repository ppa:obsproject/obs-studio -y

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Fetching last Obsidian version
wget -q https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest
echo "Retrieve the last package..."

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Downloading package
wget -q --show-progress https://builds.parsec.app/package/parsec-linux.deb -O parsec.deb

View file

@ -1,13 +1,15 @@
#!/usr/bin/env bash
which curl &> /dev/null || ( sudo apt update; sudo apt install curl -y ) # Install curl if not already installed
# Install rust
curl https://sh.rustup.rs -sSf | sh -s -- -y
# Configure current session
source $HOME/.cargo/env
source "$HOME"/.cargo/env
# If fish is used, adding cargo to path
if [ -x $HOME/.config/fish ] ; then
if [ -x "$HOME"/.config/fish ] ; then
fish -c 'set -Up fish_user_paths ~/.cargo/bin'
fi

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Add the public software signing key
wget -O- -q --show-progress https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# We make sure that Snap and flatpak versions are uninstalled
sudo snap remove spotify 2> /dev/null
sudo flatpak uninstall com.spotify.Client 2> /dev/null
@ -11,11 +13,11 @@ echo -e "\nSpotify installed!"
# We install the prerequisites to build and install the patch (Git and Rust will be installed and not removed)
sudo apt install git make build-essential -y
which rustc &> /dev/null || wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installRust.sh -O - | ( bash; source $HOME/.cargo/env ) # install rust if not already installed
which rustc &> /dev/null || wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installRust.sh -O - | ( bash; source "$HOME"/.cargo/env ) # install rust if not already installed
# Download and build the patch
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock
cd spotify-adblock || exit
make
# Install the patch

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# We add the official deposit of Syncthing
which curl &> /dev/null || sudo apt update && sudo apt install curl -y # install curl if not already installed
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
@ -9,8 +11,8 @@ sudo apt install syncthing -y
echo -e "\nSyncthing installed!"
# Launch it at startup
sudo systemctl enable syncthing@$USER.service
sudo systemctl start syncthing@$USER.service
sudo systemctl enable syncthing@"$USER".service
sudo systemctl start syncthing@"$USER".service
# We remove the Ubuntu desktop shortcut only if it already exists
if [ -f /usr/share/applications/syncthing-start.desktop ]

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash
# Install Rust if not already installed
which rustc &> /dev/null || wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installRust.sh -O - | ( bash; source $HOME/.cargo/env )
which rustc &> /dev/null || wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installRust.sh -O - | ( bash; source "$HOME"/.cargo/env )
# Install tldr
cargo install tealdeer
@ -11,7 +13,7 @@ tldr --update
# Download the file from the latest release...
latest=$(wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest)
url=$(grep 'browser_download_url": ".*/completions_fish"' <<< "$latest" | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }')
wget -q --show-progress $url -O completions_fish
wget -q --show-progress "$url" -O completions_fish
# Move it to his correct location
mv completions_fish ~/.config/fish/completions/tldr.fish

View file

@ -1,10 +1,12 @@
#!/usr/bin/env bash
# Installing depedencies
sudo apt update
sudo apt install libsdl2-dev libsdl2-image-dev git pkg-config automake make autoconf libtool -y
# Downloading and building GL4D
git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies
cd GL4Dummies || exit
make -f Makefile.autotools
./configure
make
@ -23,30 +25,30 @@ sudo ldconfig
# To correct locations to all the shell installed
# To .bashrc if exists
if [ -f $HOME/.bashrc ] ; then
echo "" >> $HOME/.bashrc
echo "# GL4Dummies" >> $HOME/.bashrc
echo "export PATH=\$PATH:\$HOME/local/bin" >> $HOME/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> $HOME/.bashrc
echo "" >> $HOME/.bashrc
if [ -f "$HOME"/.bashrc ] ; then
echo "" >> "$HOME"/.bashrc
echo "# GL4Dummies" >> "$HOME"/.bashrc
echo "export PATH=\$PATH:\$HOME/local/bin" >> "$HOME"/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> "$HOME"/.bashrc
echo "" >> "$HOME"/.bashrc
fi
# To .zshrc if exists
if [ -f $HOME/.zshrc ] ; then
echo "" >> $HOME/.zshrc
echo "# GL4Dummies" >> $HOME/.zshrc
echo "export PATH=\$PATH:\$HOME/local/bin" >> $HOME/.zshrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> $HOME/.zshrc
echo "" >> $HOME/.zshrc
if [ -f "$HOME"/.zshrc ] ; then
echo "" >> "$HOME"/.zshrc
echo "# GL4Dummies" >> "$HOME"/.zshrc
echo "export PATH=\$PATH:\$HOME/local/bin" >> "$HOME"/.zshrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> "$HOME"/.zshrc
echo "" >> "$HOME"/.zshrc
fi
# If config.fish exists
if [ -f $HOME/.config/fish/config.fish ] ; then
echo "" >> $HOME/.config/fish/config.fish
echo "# GL4Dummies" >> $HOME/.config/fish/config.fish
echo "set -gx PATH \$HOME/local/bin \$PATH" >> $HOME/.config/fish/config.fish
echo "set -gx LD_LIBRARY_PATH \$HOME/local/lib $LD_LIBRARY_PATH" >> $HOME/.config/fish/config.fish
echo "" >> $HOME/.config/fish/config.fish
if [ -f "$HOME"/.config/fish/config.fish ] ; then
echo "" >> "$HOME"/.config/fish/config.fish
echo "# GL4Dummies" >> "$HOME"/.config/fish/config.fish
echo "set -gx PATH \$HOME/local/bin \$PATH" >> "$HOME"/.config/fish/config.fish
echo "set -gx LD_LIBRARY_PATH \$HOME/local/lib $LD_LIBRARY_PATH" >> "$HOME"/.config/fish/config.fish
echo "" >> "$HOME"/.config/fish/config.fish
fi
echo -e "\nGL4D library installed! 🎉"

View file

@ -1,4 +1,6 @@
cd $(dirname $(realpath -L $(which spotify)))/Apps/ # absolute path to Spotify
#!/usr/bin/env bash
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps/ || exit # absolute path to Spotify
sudo cp xpui.spa xpui.spa_bak # create a backup, in case of trouble
sudo bash -c "unzip -p xpui.spa xpui.js | sed 's/{adsEnabled:\!0}/{adsEnabled:false}/' > xpui.js"

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
# Nautilus
# Fetching customs keyboard shortcuts
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
@ -48,11 +50,11 @@ pathicons='/usr/share/applications'
apps=("debian-xterm" "debian-uxterm" "software-properties-drivers" "software-properties-livepatch")
# We remove the Ubuntu desktop shortcut only if it already exists
for app in ${apps[@]}
for app in "${apps[@]}"
do
if [ -f $pathicons/$app.desktop ]
if [ -f $pathicons/"$app".desktop ]
then
sudo mv $pathicons/$app.desktop $pathicons/$app.desktop.bak
sudo mv $pathicons/"$app".desktop $pathicons/"$app".desktop.bak
echo "$app's icon removed!"
fi
done

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
if grep "Ubuntu" /proc/version > /dev/null || grep "WSL" /proc/version > /dev/null;
then
# Update Java