feat: dir, install changes

This commit is contained in:
2024-03-03 21:06:52 +00:00
parent 3c5b255bcf
commit 25cd4dba5e
24 changed files with 127 additions and 206 deletions

0
script/install.d/00-os_info.sh Executable file → Normal file
View File

0
script/install.d/01-ssh.sh Executable file → Normal file
View File

7
script/install.d/02-brew.sh Executable file → Normal file
View File

@@ -7,12 +7,11 @@
if [[ "$OSTYPE" == "darwin"* ]]; then
export NONINTERACTIVE=1
if ! bin_in_path brew; then
download_run https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh /bin/bash
else
brew update
if ! command -v brew &> /dev/null; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew update
brew --version
unset NONINTERACTIVE

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (distros with apt only) Install core apt packages.
#
if command -v apt-get &> /dev/null; then
apt_packages=(
curl
gnupg
gnupg2
)
sudo apt-get update
sudo apt-get install -qq "${apt_packages[@]}"
sudo apt-get autoremove
sudo apt-get autoclean
unset apt_packages
fi

View File

@@ -11,10 +11,12 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
font-fira-code-nerd-font
)
brew tap homebrew/cask-fonts
for font in "${fonts_list[@]}"; do
brew install --cask "$font"
done
if ! brew list "${fonts_list[@]}" &> /dev/null; then
brew tap homebrew/cask-fonts
for font in "${fonts_list[@]}"; do
brew install --cask "$font"
done
fi
unset fonts_list
fi

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure zsh shell.
#
if ! bin_in_path zsh; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
install zsh
fi
fi
zsh --version

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure zsh shell.
#
if ! command -v zsh &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq zsh
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install zsh
fi
fi
zsh --version
# check if oh-my-zsh is installed
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install and run stow.
#
if ! command -v stow &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -qq stow
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install stow
fi
fi
stow --version
root_dir=$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")
rm -f $HOME/.bash_profile
rm -f $HOME/.bashrc
rm -f $HOME/.gitconfig
rm -f $HOME/.profile
rm -f $HOME/.zshrc
rm -f $HOME/.ssh/config
mkdir -p $HOME/.config
mkdir -p $HOME/.ssh
sudo stow --dir="$root_dir" --target="$HOME" home
sudo stow --dir="$root_dir" --target="$HOME/.config" dot-config
sudo stow --dir="$root_dir" --target="$HOME/.ssh" dot-ssh

0
script/install.d/10-pyenv.sh Executable file → Normal file
View File

0
script/install.d/11-python.sh Executable file → Normal file
View File

0
script/install.d/12-node.sh Executable file → Normal file
View File

0
script/install.d/20-docker.sh Executable file → Normal file
View File

0
script/install.d/98-clean.sh Executable file → Normal file
View File

0
script/install.d/99-screenfetch.sh Executable file → Normal file
View File