nixos/install.sh
Evie Litherland-Smith 911f28cc45 Removed mac specific lazygit config
Can mac lazygit on mac work like other nix systems
2023-01-10 12:26:46 +00:00

40 lines
1.1 KiB
Bash
Executable file

#! /usr/bin/env sh
# Install various dotfiles into their proper places
# Get machine for specific config locations
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
echo "Machine: ${machine}"
# .config files
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
mkdir -p "$CONFIG_DIR"
for FILE in config/*; do
FILENAME="$(basename $FILE)"
if [ ! -e "$CONFIG_DIR/$FILENAME" ]
then
ln -s $(readlink -f "$FILE") "$CONFIG_DIR/$FILENAME"
echo "$(readlink -f $FILE) -> $CONFIG_DIR/$FILENAME"
fi
done
# Mac specific lazygit setup (because of course)
# UPDATE: not needed if XDG_CONFIG_HOME is set
# if [ $machine == "Mac" ]
# then
# rm "$CONFIG_DIR/lazygit"
# echo "Removed $CONFIG_DIR/lazygit"
# if [ ! -e "$HOME/Library/Application Support/lazygit" ]
# then
# ln -s "$(readlink -f config/lazygit)" "$HOME/Library/Application Support/lazygit"
# echo "$(readlink -f config/lazygit) -> $HOME/Library/Application Support/lazygit"
# fi
# fi