1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/install

32 lines
961 B
Plaintext
Raw Normal View History

2020-02-02 17:40:52 +00:00
#!/usr/bin/env zsh
2016-11-09 13:09:59 +00:00
# We need the environement to be able to symlink files accordingly
case "$1" in
desktop)
EXTENSION="desktop"
;;
thinkpad)
EXTENSION="thinkpad"
;;
esac
2020-02-02 17:40:52 +00:00
for d in $(find -- */ -maxdepth 0 -type d | cut -f1 -d '/'); do
echo "Linking $d..."
(stow -t "$HOME" "$d")
2016-11-09 13:09:59 +00:00
done
2020-02-02 17:40:52 +00:00
# Install spaceship zsh theme if it doesn't exist
2020-02-02 17:40:52 +00:00
if [ ! -d "$HOME/.oh-my-zsh/custom/themes/spaceship-prompt" ]; then
echo "Cloning spacehip-prompt..."
git clone https://github.com/denysdovhan/spaceship-prompt.git "$HOME/.oh-my-zsh/custom/themes/spaceship-prompt"
fi
if [ ! -f "$HOME/.oh-my-zsh/custom/themes/spaceship.zsh-theme" ]; then
2020-02-02 17:40:52 +00:00
echo "Linking spacehip-prompt..."
ln -s "$HOME/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme" "$HOME/.oh-my-zsh/custom/themes/spaceship.zsh-theme"
fi
if [ ! -z "$EXTENSION" ]; then
echo "\n\nDon't forget to symlink these files:\n\n"
find ~ \( -type l -o -type f \) -name "*.$EXTENSION" -exec ls -al {} \;
fi