2023-01-12 02:53:21 +00:00
|
|
|
#!/usr/bin/env -S just --justfile
|
|
|
|
|
2024-11-21 03:15:46 +00:00
|
|
|
# Naive check if /Users or {{HOME}} for home.
|
2023-01-17 23:19:04 +00:00
|
|
|
OS := if "${HOME}" =~ '/U.*' {
|
|
|
|
"macos"
|
|
|
|
} else {
|
2023-01-18 02:16:37 +00:00
|
|
|
if `cat /etc/issue 2>/dev/null || true` =~ "Deb.*" { "debian" } else { "ubuntu" }
|
2023-01-17 23:19:04 +00:00
|
|
|
}
|
2024-05-14 21:02:21 +00:00
|
|
|
PWD := `pwd`
|
2024-11-21 03:15:46 +00:00
|
|
|
HOME := "${HOME}"
|
|
|
|
USER := "${USER}"
|
2023-01-16 05:55:12 +00:00
|
|
|
|
2024-11-21 03:15:46 +00:00
|
|
|
list-vars:
|
2024-05-14 21:02:21 +00:00
|
|
|
echo "{{PWD}}"
|
2024-11-21 03:15:46 +00:00
|
|
|
echo "{{HOME}}"
|
|
|
|
echo "{{USER}}"
|
2023-02-18 04:28:19 +00:00
|
|
|
|
2023-01-12 02:53:21 +00:00
|
|
|
git-add:
|
|
|
|
git add .
|
|
|
|
|
2024-05-14 21:02:21 +00:00
|
|
|
rust:
|
|
|
|
curl https://sh.rustup.rs -sSf | sh
|
|
|
|
|
|
|
|
pyenv:
|
|
|
|
sudo curl https://pyenv.run | bash
|
2024-11-21 03:15:46 +00:00
|
|
|
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> {{HOME}}/.bashrc
|
|
|
|
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> {{HOME}}/.bashrc
|
|
|
|
echo 'eval "$(pyenv init -)"' >> {{HOME}}/.bashrc
|
2024-05-14 21:02:21 +00:00
|
|
|
pyenv install 3.12.3
|
|
|
|
pyenv global 3.12.3
|
|
|
|
|
2024-08-13 20:28:51 +00:00
|
|
|
reset-symlinks:
|
2024-11-21 03:15:46 +00:00
|
|
|
rm {{HOME}}/.config/nvim || true
|
|
|
|
rm {{HOME}}/bin || true
|
|
|
|
rm {{HOME}}/.gitconfig || true
|
|
|
|
rm {{HOME}}/.shell_base || true
|
|
|
|
rm {{HOME}}/.p10k.zsh || true
|
|
|
|
rm {{HOME}}/.shell_aliases || true
|
|
|
|
rm {{HOME}}/.shell_funcs || true
|
|
|
|
rm {{HOME}}/.shell_exports || true
|
2024-08-13 20:28:51 +00:00
|
|
|
|
2024-05-14 21:02:21 +00:00
|
|
|
symlinks:
|
2024-11-21 03:15:46 +00:00
|
|
|
ln -s {{PWD}}/home/gitconfig {{HOME}}/.gitconfig
|
|
|
|
ln -s {{PWD}}/home/shell_base {{HOME}}/.shell_base
|
|
|
|
ln -s {{PWD}}/home/p10k.zsh {{HOME}}/.p10k.zsh
|
|
|
|
ln -s {{PWD}}/home/shell_aliases {{HOME}}/.shell_aliases
|
|
|
|
ln -s {{PWD}}/home/shell_funcs {{HOME}}/.shell_funcs
|
|
|
|
ln -s {{PWD}}/home/shell_exports {{HOME}}/.shell_exports
|
|
|
|
ln -s {{PWD}}/home/bin {{HOME}}/bin
|
|
|
|
ln -s {{PWD}}/home/config/nvim {{HOME}}/.config/
|
2024-05-14 21:13:50 +00:00
|
|
|
echo "source ~/.shell_base" >> ~/.bashrc
|
2024-08-13 20:28:51 +00:00
|
|
|
echo "source ~/.shell_base" >> ~/.zshrc
|
2024-05-14 21:02:21 +00:00
|
|
|
|
2024-05-14 21:13:50 +00:00
|
|
|
debian: rust pyenv symlinks
|
2024-05-14 21:02:21 +00:00
|
|
|
sudo apt-get install software-properties-common
|
|
|
|
sudo add-apt-repository -y ppa:neovim-ppa/unstable
|
|
|
|
sudo apt update
|
|
|
|
sudo apt-get install -y libncurses5-dev neovim
|
|
|
|
sudo apt-get install -y build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev
|
|
|
|
sudo apt-get install -y git-lfs
|
|
|
|
|
2024-05-14 21:13:50 +00:00
|
|
|
arch: rust pyenv symlinks
|
2024-05-20 14:04:53 +00:00
|
|
|
sudo pacman -S git git-lfs ctags rofi terminator tint2 tree-sitter unzip cpan base-devel bat exa nitch
|
2024-05-14 21:13:50 +00:00
|
|
|
|
2024-05-20 14:11:44 +00:00
|
|
|
ssh-keys:
|
|
|
|
cat home/ssh/*.pub > ~/.ssh/authorized_keys
|
2024-11-21 03:15:46 +00:00
|
|
|
|
|
|
|
brew-save:
|
|
|
|
brew bundle dump
|
|
|
|
brew-install:
|
|
|
|
brew bundle
|