Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 31 lines (28 sloc) 0.684 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/bin/bash
replace=""

for f in $(ls)
do
test $f = "install" && continue
dest="$HOME/.$f"
  file="$PWD/$f"
  if [ -e $dest ] || [ -h $dest ]; then
if [ "$replace" != "a" ]; then
echo "$dest already exists, replace? [y/n/a] "
      read replace
    fi
if [ "$replace" = "a" ] || [ "$replace" = "y" ]; then
echo "linking $file to $dest..."
      rm -f $dest
      ln -s $file $dest
      test "$replace" != "a" && replace=""
    else
echo "skipping $file as it already exists..."
    fi
elif [ "$f" == "README" ]; then
echo "skipping README: $f."
  else
echo "linking $file to $dest..."
    ln -s $file $dest
  fi
done

nano $HOME/.gitconfig
Something went wrong with that request. Please try again.