follow shellcheck

This commit is contained in:
Mylloon 2023-02-07 15:40:29 +01:00
parent f88012a4a4
commit 184416c686
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -14,15 +14,15 @@ then
pkill -9 codium pkill -9 codium
fi fi
if [ -x $HOME/.vscodium_scripts ] ; then # if the folder already exists (not the first run?) if [ -x "$HOME"/.vscodium_scripts ] ; then # if the folder already exists (not the first run?)
# go to the folder and clear it # go to the folder and clear it
cd $HOME/.vscodium_scripts cd "$HOME/.vscodium_scripts" || exit
rm * rm ./*
else # if the folder isn't already created (first run?) else # if the folder isn't already created (first run?)
# creating the folder # creating the folder
mkdir $HOME/.vscodium_scripts mkdir "$HOME/".vscodium_scripts
cd $HOME/.vscodium_scripts cd "$HOME"/.vscodium_scripts || exit
echo "" echo ""
echo "First run, adding commmands to shell, you will need to restart your shell" echo "First run, adding commmands to shell, you will need to restart your shell"
@ -33,23 +33,27 @@ else # if the folder isn't already created (first run?)
# to .bashrc (i assume it always exists, anyways if not this script is hard to start # to .bashrc (i assume it always exists, anyways if not this script is hard to start
# because all the alias/abbr are using bash) # because all the alias/abbr are using bash)
echo "" >> $HOME/.bashrc {
echo "# Alias for Codium" >> $HOME/.bashrc echo ""
echo "alias updateCodium='bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" >> $HOME/.bashrc echo "# Alias for Codium"
echo "alias code='\$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'" >> $HOME/.bashrc echo "alias updateCodium='bash \$HOME/.vscodium_scripts/updateVSCodium.sh'"
echo "" >> $HOME/.bashrc echo "alias code='\$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'"
echo ""
} >> "$HOME"/.bashrc
# to .zshrc if exists # to .zshrc if exists
if [ -f $HOME/.zshrc ] ; then if [ -f "$HOME"/.zshrc ] ; then
echo "" >> $HOME/.zshrc {
echo "# Alias for Codium" >> $HOME/.zshrc echo ""
echo "alias updateCodium='bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" >> $HOME/.zshrc echo "# Alias for Codium"
echo "alias code='\$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'" >> $HOME/.zshrc echo "alias updateCodium='bash \$HOME/.vscodium_scripts/updateVSCodium.sh'"
echo "" >> $HOME/.zshrc echo "alias code='\$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'"
echo ""
} >> "$HOME"/.zshrc
fi fi
# if config.fish exists # if config.fish exists
if [ -f $HOME/.config/fish/config.fish ] ; then if [ -f "$HOME"/.config/fish/config.fish ] ; then
fish -c "abbr updateCodium 'bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" fish -c "abbr updateCodium 'bash \$HOME/.vscodium_scripts/updateVSCodium.sh'"
fish -c "abbr code 'bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'" fish -c "abbr code 'bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 & disown'"
fi fi