Add machine specific lazygit config
This commit is contained in:
parent
7fe33de53d
commit
740574a5c5
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -2,6 +2,9 @@
|
||||||
*.swp
|
*.swp
|
||||||
.python-version
|
.python-version
|
||||||
.DS_Store
|
.DS_Store
|
||||||
plugin/
|
# For Packer plugins
|
||||||
|
plugin
|
||||||
|
# For lazygit state file
|
||||||
|
state.yml
|
||||||
|
# For pynvim environment
|
||||||
venv
|
venv
|
28
install.sh
28
install.sh
|
@ -1,14 +1,38 @@
|
||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
# Install various dotfiles into their proper places
|
# 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 files
|
||||||
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
mkdir -p "$CONFIG_DIR"
|
mkdir -p "$CONFIG_DIR"
|
||||||
|
|
||||||
for FILE in config/*; do
|
for FILE in config/*; do
|
||||||
FILENAME="$(basename $FILE)"
|
FILENAME="$(basename $FILE)"
|
||||||
if [ ! -e "$CONFIG_DIR/$FILENAME" ]; then
|
if [ ! -e "$CONFIG_DIR/$FILENAME" ]
|
||||||
|
then
|
||||||
ln -s $(readlink -f "$FILE") "$CONFIG_DIR/$FILENAME"
|
ln -s $(readlink -f "$FILE") "$CONFIG_DIR/$FILENAME"
|
||||||
|
echo "$(readlink -f $FILE) -> $CONFIG_DIR/$FILENAME"
|
||||||
fi
|
fi
|
||||||
echo "$(readlink -f $FILE) -> $CONFIG_DIR/$FILENAME"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Mac specific lazygit setup (because of course)
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue