* update to match arch config and style
* use sudo everywhere
This commit is contained in:
parent
1fecacf2c7
commit
901aaa8a4d
2 changed files with 37 additions and 52 deletions
|
@ -2,8 +2,5 @@
|
||||||
sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000
|
sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000
|
||||||
sudo mount -t drvfs 'Z:' /mnt/z -o metadata,uid=1000,gid=1000 2> /dev/null
|
sudo mount -t drvfs 'Z:' /mnt/z -o metadata,uid=1000,gid=1000 2> /dev/null
|
||||||
|
|
||||||
# COLORED MANUALS
|
|
||||||
set -x MANPAGER "sh -c 'col -bx | batcat -l man -p'"
|
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
fish_ssh_agent
|
fish_ssh_agent
|
||||||
|
|
86
wsl.sh
86
wsl.sh
|
@ -2,32 +2,32 @@
|
||||||
|
|
||||||
if grep "WSL" /proc/version > /dev/null;
|
if grep "WSL" /proc/version > /dev/null;
|
||||||
then
|
then
|
||||||
|
# === Add repositories ==
|
||||||
|
apt-add-repository ppa:fish-shell/release-3 -y
|
||||||
|
|
||||||
# === Update Ubuntu ==
|
# === Update Ubuntu ==
|
||||||
sudo sed -i "s/focal/jammy/g" /etc/apt/sources.list
|
sed -i "s/focal/jammy/g" /etc/apt/sources.list
|
||||||
sudo sed -i "s/focal/jammy/g" /etc/apt/sources.list.d/*.list
|
sed -i "s/focal/jammy/g" /etc/apt/sources.list.d/*.list
|
||||||
sudo apt update
|
apt update
|
||||||
sudo apt dist-upgrade -y
|
apt dist-upgrade -y
|
||||||
sudo apt full-upgrade -y
|
apt full-upgrade -y
|
||||||
|
|
||||||
# === Remove SU password ==
|
# === Remove SU password ==
|
||||||
sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
||||||
sudo sed -i "44s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
sed -i "44s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
||||||
sudo sed -i "50s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
sed -i "50s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers
|
||||||
|
|
||||||
# === Requirements ==
|
# === Install packages ==
|
||||||
which git &> /dev/null || sudo apt install git -y # install git if not already installed
|
apt install -y git apt-transport-https curl wget build-essential valgrind fish fzf bat procps exa micro libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libassimp-dev libfftw3-dev pkg-config automake make autoconf libtool perl-tk python3-pygments python3-venv python3-tk git-lfs zip unzip sed
|
||||||
which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed
|
|
||||||
which wget &> /dev/null || sudo apt install wget -y # install wget if not already installed
|
|
||||||
|
|
||||||
# === Basic dev ==
|
# === Remove useless packages
|
||||||
sudo apt install build-essential valgrind -y
|
apt purge -y needrestart # remove kernel update message (https://github.com/microsoft/WSL/issues/7054#issuecomment-864271333)
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
# === Fish ==
|
# === Fish ==
|
||||||
sudo apt-add-repository ppa:fish-shell/release-3 -y
|
# Install micro
|
||||||
sudo apt update
|
|
||||||
sudo apt install fish fzf bat procps exa micro -y
|
|
||||||
cd /usr/local/bin || exit
|
cd /usr/local/bin || exit
|
||||||
curl https://getmic.ro | sudo GETMICRO_PLATFORM=linux64 bash
|
curl https://getmic.ro | GETMICRO_PLATFORM=linux64 bash
|
||||||
cd - || exit
|
cd - || exit
|
||||||
# Remove motd
|
# Remove motd
|
||||||
fish -c "set -U fish_greeting"
|
fish -c "set -U fish_greeting"
|
||||||
|
@ -73,8 +73,10 @@ then
|
||||||
fish -c "set -U fish_pager_color_selected_background --background=brblack"
|
fish -c "set -U fish_pager_color_selected_background --background=brblack"
|
||||||
fish -c "set -U fish_color_option d3d0c8"
|
fish -c "set -U fish_color_option d3d0c8"
|
||||||
fish -c "set -U fish_color_keyword 99cc99"
|
fish -c "set -U fish_color_keyword 99cc99"
|
||||||
|
# EXA colors
|
||||||
|
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
|
||||||
# Adding aliases
|
# Adding aliases
|
||||||
fish -c "abbr ls 'exa -glh'"
|
fish -c "abbr ls 'exa --git --icons -glh'"
|
||||||
fish -c "abbr cp 'cp -rv'"
|
fish -c "abbr cp 'cp -rv'"
|
||||||
fish -c "abbr rm 'rm -rf'"
|
fish -c "abbr rm 'rm -rf'"
|
||||||
fish -c "abbr gcc 'clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -g main.c && ./a.out; rm a.out 2> /dev/null'"
|
fish -c "abbr gcc 'clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -g main.c && ./a.out; rm a.out 2> /dev/null'"
|
||||||
|
@ -90,13 +92,17 @@ then
|
||||||
fish -c "abbr - 'cd -'"
|
fish -c "abbr - 'cd -'"
|
||||||
fish -c "abbr cat 'batcat'"
|
fish -c "abbr cat 'batcat'"
|
||||||
fish -c "abbr nano 'micro'"
|
fish -c "abbr nano 'micro'"
|
||||||
fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && tldr --update && sdk update && echo \'y\' | sdk upgrade java'"
|
fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && tldr --update && sdk update && yes | sdk upgrade java'"
|
||||||
fish -c "abbr d 'explorer.exe .'"
|
fish -c "abbr d 'explorer.exe .'"
|
||||||
|
fish -c "abbr gc 'git clone'"
|
||||||
fish -c "abbr tlmgr 'sudo \$(which tlmgr)'"
|
fish -c "abbr tlmgr 'sudo \$(which tlmgr)'"
|
||||||
|
|
||||||
|
# === Micro configuration ==
|
||||||
|
git config --global core.editor "micro"
|
||||||
|
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
|
||||||
|
micro -plugin install detectindent
|
||||||
|
|
||||||
# === GL4D ==
|
# === GL4D ==
|
||||||
# Installing depedencies
|
|
||||||
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libassimp-dev libfftw3-dev pkg-config automake make autoconf libtool -y
|
|
||||||
# Download and build
|
# Download and build
|
||||||
git clone https://github.com/noalien/GL4Dummies.git
|
git clone https://github.com/noalien/GL4Dummies.git
|
||||||
cd GL4Dummies || exit
|
cd GL4Dummies || exit
|
||||||
|
@ -104,34 +110,26 @@ then
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
# Installing it
|
# Installing it
|
||||||
sudo make install
|
make install
|
||||||
# Removing folder
|
# Removing folder
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf GL4Dummies
|
rm -rf GL4Dummies
|
||||||
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
||||||
sudo ldconfig
|
ldconfig
|
||||||
# Add to path
|
# Add to path
|
||||||
if [ -f "$HOME"/.bashrc ] ; then
|
#echo -e "\n# GL4Dummies\nexport PATH=/usr/local/bin:\$PATH\nexport LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH\n" >> "$HOME"/.bashrc
|
||||||
echo -e "\n# GL4Dummies\nexport PATH=/usr/local/bin:\$PATH\nexport LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH\n" >> "$HOME"/.bashrc
|
fish -c "set -Ux LD_LIBRARY_PATH /usr/local/lib \$LD_LIBRARY_PATH"
|
||||||
fi
|
|
||||||
if [ -f "$HOME"/.config/fish/config.fish ] ; then
|
|
||||||
echo -e "\n# GL4Dummies\nset -gx LD_LIBRARY_PATH /usr/local/lib \$LD_LIBRARY_PATH\n" >> "$HOME"/.config/fish/config.fish
|
|
||||||
fi
|
|
||||||
|
|
||||||
# === Latex ==
|
# === Latex ==
|
||||||
sudo apt install perl-tk python3-pygments -y
|
|
||||||
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
|
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
|
||||||
tar -xzf install-tl-unx.tar.gz
|
tar -xzf install-tl-unx.tar.gz
|
||||||
rm ./*.tar.gz
|
rm ./*.tar.gz
|
||||||
cd install-tl-* || exit
|
cd install-tl-* || exit
|
||||||
echo "I" | sudo ./install-tl
|
echo "I" | ./install-tl
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf install-tl-*
|
rm -rf install-tl-*
|
||||||
fish -c "fish_add_path /usr/local/texlive/*/bin/x86_64-linux"
|
fish -c "fish_add_path /usr/local/texlive/*/bin/x86_64-linux"
|
||||||
|
|
||||||
# === Python stuff ==
|
|
||||||
sudo apt install python3-venv python3-tk -y
|
|
||||||
|
|
||||||
# === Sign commits ==
|
# === Sign commits ==
|
||||||
git config --global commit.gpgsign true
|
git config --global commit.gpgsign true
|
||||||
|
|
||||||
|
@ -152,11 +150,7 @@ then
|
||||||
wget -q --show-progress "$url" -O completions_fish
|
wget -q --show-progress "$url" -O completions_fish
|
||||||
mv completions_fish ~/.config/fish/completions/tldr.fish
|
mv completions_fish ~/.config/fish/completions/tldr.fish
|
||||||
|
|
||||||
# === Git LFS ==
|
|
||||||
sudo apt install git-lfs -y
|
|
||||||
|
|
||||||
# === Java ==
|
# === Java ==
|
||||||
sudo apt install zip unzip sed -y # sed probably installed but it doesn't cost anything to double-check
|
|
||||||
curl -s "https://get.sdkman.io" | bash
|
curl -s "https://get.sdkman.io" | bash
|
||||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
# Adding Fish support if fish is installed
|
# Adding Fish support if fish is installed
|
||||||
|
@ -167,19 +161,13 @@ then
|
||||||
fish -c 'fisher install reitzig/sdkman-for-fish'
|
fish -c 'fisher install reitzig/sdkman-for-fish'
|
||||||
fi
|
fi
|
||||||
sdk install java 17.0.2-tem # https://whichjdk.com/#adoptium-eclipse-temurin
|
sdk install java 17.0.2-tem # https://whichjdk.com/#adoptium-eclipse-temurin
|
||||||
echo "y" | sdk upgrade java
|
yes | sdk upgrade java
|
||||||
|
|
||||||
# === NodeJS ==
|
# === Manual color ==
|
||||||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | batcat -l man -p'\""
|
||||||
sudo apt-get install -y nodejs
|
|
||||||
|
|
||||||
# === Shared folders ==
|
# === Shared folders ==
|
||||||
sudo mkdir /mnt/z && sudo mkdir /mnt/y
|
mkdir /mnt/z && mkdir /mnt/y
|
||||||
|
|
||||||
# === Remove useless packages
|
|
||||||
sudo apt purge needrestart -y # remove kernel update message (https://github.com/microsoft/WSL/issues/7054#issuecomment-864271333)
|
|
||||||
sudo apt autoremove -y
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl --shutdown)."
|
echo -e "\nInstallation terminée !\nIl faut redémarrer WSL (dans Powershell = wsl --shutdown)."
|
||||||
echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :"
|
echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :"
|
||||||
|
|
Loading…
Reference in a new issue