add os detection in install script
This commit is contained in:
13
install.sh
13
install.sh
@@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
for arg in "$@"; do declare $arg=1; done
|
||||||
|
|
||||||
|
if [ ! -v macos ]; then linux=1; fi
|
||||||
|
|
||||||
# install wezterm config
|
# install wezterm config
|
||||||
ln -s "$HOME/dotfiles/.wezterm.lua" "$HOME/.wezterm.lua"
|
ln -s "$HOME/dotfiles/.wezterm.lua" "$HOME/.wezterm.lua"
|
||||||
|
|
||||||
@@ -11,13 +16,10 @@ fi
|
|||||||
# install starship config
|
# install starship config
|
||||||
ln -s "$HOME/dotfiles/starship.toml" "$HOME/.config/starship.toml"
|
ln -s "$HOME/dotfiles/starship.toml" "$HOME/.config/starship.toml"
|
||||||
|
|
||||||
# install goneovim config
|
if [ ! -v linux ]; then
|
||||||
mkdir -p "$HOME/.config/goneovim"
|
|
||||||
ln -s "$HOME/dotfiles/goneovim.toml" "$HOME/.config/goneovim/settings.toml"
|
|
||||||
|
|
||||||
# install aerospace config
|
# install aerospace config
|
||||||
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml"
|
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml"
|
||||||
|
else
|
||||||
# install sway
|
# install sway
|
||||||
if [ ! -d "$HOME/.config/sway" ]; then
|
if [ ! -d "$HOME/.config/sway" ]; then
|
||||||
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway"
|
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway"
|
||||||
@@ -37,3 +39,4 @@ fi
|
|||||||
if [ ! -d "$HOME/.config/dunst" ]; then
|
if [ ! -d "$HOME/.config/dunst" ]; then
|
||||||
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst"
|
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user