diff --git a/copy.sh b/copy.sh index daa0897..551ce58 100755 --- a/copy.sh +++ b/copy.sh @@ -2,6 +2,7 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" FAKE_HOME="$SCRIPT_DIR/fake_home" +export f="$FAKE_HOME" if ! command -v wget &> /dev/null; then echo "wget must be installed!" @@ -28,9 +29,14 @@ echo "$dotfiles" | while read -r dotfile; do ln -sf "$dotfile" "$new" done -if ! grep DOT_DIR $HOME/.zsh_local; then - echo "export DOT_DIR=\"$SCRIPT_DIR\"" >> $HOME/.zsh_local -fi +function add-export { + if ! grep "$1" "$HOME/.zsh_local"; then + echo "$1\"$2\"" >> "$HOME/.zsh_local" + fi +} + +add-export "export DOT_DIR=" "$SCRIPT_DIR" +add-export "export f=" "$FAKE_HOME" if [[ "$1" == "--files-only" ]]; then exit 0 diff --git a/fake_home/.vim/templates/skeleton.md b/fake_home/.vim/templates/skeleton.md new file mode 100644 index 0000000..efc38fb --- /dev/null +++ b/fake_home/.vim/templates/skeleton.md @@ -0,0 +1,14 @@ +# Heading 1 + +Aut impedit numquam quasi libero accusantium. Explicabo error rem vel eius +sequi quam omnis. Officia est molestias nemo asperiores deleniti omnis atque. +Provident facere itaque ut culpa sapiente sit assumenda. + +## Heading 2 + +* This +* Is +* A +* List + +[This is a link](butyouknewthat.com) diff --git a/fake_home/.vimrc b/fake_home/.vimrc index 70e34a7..11ce25a 100644 --- a/fake_home/.vimrc +++ b/fake_home/.vimrc @@ -164,6 +164,7 @@ if has ("autocmd") autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh autocmd BufNewFile *.py 0r ~/.vim/templates/skeleton.py autocmd BufNewFile *.rb 0r ~/.vim/templates/skeleton.rb + autocmd BufNewFile *.md 0r ~/.vim/templates/skeleton.md autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile augroup END