Skip to content

Instantly share code, notes, and snippets.

@flashingpumpkin
Created May 3, 2012 16:10
Show Gist options
  • Select an option

  • Save flashingpumpkin/2586854 to your computer and use it in GitHub Desktop.

Select an option

Save flashingpumpkin/2586854 to your computer and use it in GitHub Desktop.
#!/bin/bash
exclude='(.dotfiles/$|.git)'
# Link files
find ~/.dotfiles/ -type f -name ".*" -exec ln -s -f {} --target-directory=$HOME/ \;
# Copy folders
find ~/.dotfiles/ -maxdepth 1 -name ".*" -type d | grep -vE $exclude | xargs -I {} cp -v -r {} $HOME
mkdir -p $HOME/bin/
ln -s -f ~/.dotfiles/bin/* --target-directory=$HOME/bin/
. "$HOME/.profile"
@flashingpumpkin
Copy link
Copy Markdown
Author

Dotfiles repo post commit hook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment