Permalink
Please sign in to comment.
| @@ -0,0 +1,28 @@ | ||
| pkgs_all := $(shell echo */) | ||
| pkgs_regular := git neovim ssh tmux | ||
| pkgs_no_fold := fish | ||
| cmd_install := stow --stow | ||
| cmd_uninstall := stow --delete | ||
| .PHONY: all | ||
| all: ; | ||
| .PHONY: install | ||
| install: | ||
| @for package in $(pkgs_regular); do \ | ||
| $(cmd_install) $$package; \ | ||
| done | ||
| @for package in $(pkgs_no_fold); do \ | ||
| $(cmd_install) --no-folding $$package; \ | ||
| done | ||
| .PHONY: install-osx | ||
| install-osx: install | ||
| @$(cmd_install) osx | ||
| .PHONY: uninstall | ||
| uninstall: | ||
| @for package in $(pkgs_all); do \ | ||
| $(cmd_uninstall) $$package; \ | ||
| done |
| @@ -1,47 +0,0 @@ | ||
| #!/bin/bash | ||
| # Create needed directories if they don't already exist | ||
| mkdir -p "$HOME/.hgext" | ||
| mkdir -p "$HOME/.ssh/config.d" | ||
| FILES=" | ||
| ctags | ||
| gemrc | ||
| gitconfig | ||
| gitignore | ||
| hgext/hgshelve.py | ||
| hgrc | ||
| psqlrc | ||
| rpmmacros | ||
| ssh/config.d/default | ||
| tmux.conf | ||
| vim | ||
| vimrc | ||
| zlogin | ||
| zsh | ||
| zshenv | ||
| zshrc | ||
| " | ||
| # Create symbolic links for all configuration files | ||
| for file in $FILES | ||
| do | ||
| SOURCE="$HOME/.dotfiles/$file" | ||
| TARGET="$HOME/.$file" | ||
| # Create backup file if the target already exists and is not a symlink | ||
| if [ -e "$TARGET" ] && [ ! -L "$TARGET" ]; then | ||
| echo "*** WARNING *** $TARGET already exists; copying original to .$file.old" | ||
| mv "$TARGET" "$TARGET.old" | ||
| fi | ||
| case $OSTYPE in | ||
| darwin*) | ||
| ln -hfsv "$SOURCE" "$TARGET" | ||
| ;; | ||
| linux*) | ||
| ln -fsv "$SOURCE" "$TARGET" | ||
| ;; | ||
| esac | ||
| done | ||
| exit 0 |
0 comments on commit
c3068f3