Compare commits
2 commits
6043c65210
...
cf6e7f001b
Author | SHA1 | Date | |
---|---|---|---|
cf6e7f001b | |||
2820f10e6a |
4 changed files with 40 additions and 10 deletions
42
install.sh
42
install.sh
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
readonly PROGNAME=$(basename $0)
|
||||
readonly PROGDIR=$(readlink -m $(dirname $0))
|
||||
readonly ARGS="$@"
|
||||
|
||||
install_homebrew() {
|
||||
echo -n Checking homebrew...
|
||||
if command -v brew > /dev/null; then
|
||||
|
@ -164,8 +168,16 @@ install_darwin_brew_packages() {
|
|||
|
||||
install_darwin_brew_cask_packages() {
|
||||
echo -n Checking Darwin brew cask packages...
|
||||
package_files="packages-darwin-brew-cask.txt"
|
||||
if [[ $ARGS == "personal" ]]; then
|
||||
package_files+=" packages-darwin-brew-cask-personal.txt"
|
||||
fi
|
||||
if [[ $ARGS == "work" ]]; then
|
||||
package_files+=" packages-darwin-brew-cask-work.txt"
|
||||
fi
|
||||
|
||||
missing_packages=$(
|
||||
comm -23 <(cat packages-darwin-brew-cask.txt) <(brew list | sort) \
|
||||
comm -23 <(cat $package_files | sort) <(brew list | sort) \
|
||||
| tr "\n" " "
|
||||
)
|
||||
|
||||
|
@ -180,7 +192,7 @@ install_darwin_brew_cask_packages() {
|
|||
|
||||
install_color_default() {
|
||||
echo -n Checking color default file...
|
||||
if [[ -f $HOME/.config/atomaka/color.yml ]]; then
|
||||
if [[ -f $HOME/.config/$USER/color.yml ]]; then
|
||||
echo -n already installed...
|
||||
else
|
||||
echo -n installing....
|
||||
|
@ -197,6 +209,18 @@ install_darwin_profile_hack() {
|
|||
echo -n installing...
|
||||
sudo mv /etc/{zprofile,zprofile.old}
|
||||
fi
|
||||
echo done
|
||||
}
|
||||
|
||||
install_rosetta() {
|
||||
echo -n Installing Rosetta...
|
||||
if pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto &> /dev/null; then
|
||||
echo -n already installled...
|
||||
else
|
||||
echo -n installing...
|
||||
softwareupdate --install-rosetta --agree-to-license
|
||||
fi
|
||||
echo done
|
||||
}
|
||||
|
||||
install_env() {
|
||||
|
@ -210,6 +234,10 @@ install_env() {
|
|||
echo done
|
||||
}
|
||||
|
||||
install_stow_paths() {
|
||||
stow alacritty bin git nvim ruby tmux zsh
|
||||
}
|
||||
|
||||
install_linux() {
|
||||
if ! command -v apt-get > /dev/null; then
|
||||
echo apt-get is required, but not available
|
||||
|
@ -224,6 +252,8 @@ install_linux() {
|
|||
install_rust
|
||||
install_alacritty
|
||||
install_alacritty_terminfo
|
||||
install_stow_paths
|
||||
install_color_default
|
||||
}
|
||||
|
||||
install_darwin() {
|
||||
|
@ -233,10 +263,12 @@ install_darwin() {
|
|||
install_shared_brew_packages
|
||||
install_fzf
|
||||
install_rust
|
||||
softwareupdate --install-rosetta --agree-to-license
|
||||
install_rosetta
|
||||
install_darwin_brew_packages
|
||||
install_darwin_brew_cask_packages
|
||||
install_tmux_terminfo
|
||||
install_stow_paths
|
||||
install_color_default
|
||||
}
|
||||
|
||||
main() {
|
||||
|
@ -250,10 +282,6 @@ main() {
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
stow alacritty bin git nvim ruby tmux zsh
|
||||
|
||||
install_color_default
|
||||
}
|
||||
|
||||
main
|
||||
|
|
4
packages-darwin-brew-cask-personal.txt
Normal file
4
packages-darwin-brew-cask-personal.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
arduino-ide
|
||||
battle-net
|
||||
prusaslicer
|
||||
zwift
|
1
packages-darwin-brew-cask-work.txt
Normal file
1
packages-darwin-brew-cask-work.txt
Normal file
|
@ -0,0 +1 @@
|
|||
notion
|
|
@ -1,11 +1,8 @@
|
|||
alacritty
|
||||
brave-browser
|
||||
discord
|
||||
element
|
||||
firefox
|
||||
google-chrome
|
||||
notion
|
||||
rectangle
|
||||
slack
|
||||
telegram
|
||||
zoom
|
||||
|
|
Loading…
Add table
Reference in a new issue