Make extra software installers work correctly

This commit is contained in:
Evie Litherland-Smith 2023-01-27 08:19:39 +00:00
parent 168efa5d08
commit 737afa0ba3
2 changed files with 26 additions and 36 deletions

View file

@ -1,10 +1,12 @@
#! /usr/bin/env bash #! /usr/bin/env bash
pipx install pyright # pipx
pipx install poetry command -v pipx > /dev/null || python3 -m pip install --user pipx
pipx install black command -v pyright > /dev/null || python3 -m pipx install pyright
pipx install isort command -v poetry > /dev/null || python3 -m pipx install poetry
pipx install zimports command -v black > /dev/null || python3 -m pipx install black
pipx install pre-commit command -v isort > /dev/null || python3 -m pipx install isort
pipx install ranger-fm command -v zimports > /dev/null || python3 -m pipx install zimports
pipx install euporie command -v pre-commit > /dev/null || python3 -m pipx install pre-commit
command -v ranger > /dev/null || python3 -m pipx install ranger-fm
command -v euporie > /dev/null || python3 -m pipx install euporie

View file

@ -1,15 +1,10 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# Install various programs # Install various programs
echo "--- Not finished, not recommended to run as a script ---"
echo "--- Copy individual commands and run as desired ---"
exit 1
mkdir -p "$HOME/.local/bin" mkdir -p "$HOME/.local/bin"
# kitty # kitty
if [ ! which -a kitty > /dev/null ] command -v kitty > /dev/null || {
then
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
# Create a symbolic link to add kitty to PATH (assuming $HOME/.local/bin is in # Create a symbolic link to add kitty to PATH (assuming $HOME/.local/bin is in
# your system-wide PATH) # your system-wide PATH)
@ -19,39 +14,32 @@ then
# If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file # If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file
cp "$HOME/.local/kitty.app/share/applications/kitty-open.desktop" "$HOME/.local/share/applications/" cp "$HOME/.local/kitty.app/share/applications/kitty-open.desktop" "$HOME/.local/share/applications/"
# Update the paths to the kitty and its icon in the kitty.desktop file(s) # Update the paths to the kitty and its icon in the kitty.desktop file(s)
sed -i "s|Icon=kitty|Icon=/home/$USER/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" "$HOME/.local/share/applications/kitty*.desktop" sed -i "s|Icon=kitty|Icon=/home/$USER/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" "$HOME/.local/share/applications/kitty.desktop"
sed -i "s|Exec=kitty|Exec=/home/$USER/.local/kitty.app/bin/kitty|g" "$HOME/.local/share/applications/kitty*.desktop" sed -i "s|Exec=kitty|Exec=/home/$USER/.local/kitty.app/bin/kitty|g" "$HOME/.local/share/applications/kitty.desktop"
fi }
# neovim # neovim
if [ ! which -a nvim > /dev/null ] command -v nvim > /dev/null || {
then
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage chmod u+x nvim.appimage
mv nvim.appimage "$HOME/.local/bin/nvim" mv nvim.appimage "$HOME/.local/bin/nvim"
ln -s "$HOME/.local/bin/nvim" "$HOME/.local/bin/vim" ln -s "$HOME/.local/bin/nvim" "$HOME/.local/bin/vim"
fi }
# fzf # fzf
if [ ! which -a fzf > /dev/null ] command -v fzf > /dev/null || {
then
git clone --depth 1 https://github.com/junegunn/fzf.git "$HOME/.fzf" git clone --depth 1 https://github.com/junegunn/fzf.git "$HOME/.fzf"
"$HOME/.fzf/install" "$HOME/.fzf/install"
fi }
# pipx
if [ ! which -a fzf > /dev/null ]
then
python3 -m pip install --user pipx
fi
# pyenv # pyenv
if [ ! which -a pyenv > /dev/null ] command -v pyenv > /dev/null || {
then
curl https://pyenv.run | bash curl https://pyenv.run | bash
# Below are suggested dependencies for python # Below are suggested dependencies for python
# sudo apt update command -v apt > /dev/null || {
# sudo apt install build-essential libssl-dev zlib1g-dev \ sudo apt update
# libbz2-dev libreadline-dev libsqlite3-dev curl llvm \ sudo apt install build-essential libssl-dev zlib1g-dev \
# libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
fi libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
}
}