Skip to content

Instantly share code, notes, and snippets.

@syui
Created August 3, 2014 12:32
Show Gist options
  • Save syui/fd3ea4192b8c61b4b0d1 to your computer and use it in GitHub Desktop.
Save syui/fd3ea4192b8c61b4b0d1 to your computer and use it in GitHub Desktop.
#!/bin/zsh
dir=${0:a:h}/dotfiles/
url=`curl https://raw.githubusercontent.com/syui/dotfiles/master/.dotfiles`
line=`echo $url | wc -l | tr -d ' '`
for ((i = $line ; i > 0 ; i-- ))
do
repo=`echo $url | awk "NR==$i"`
file=`echo $repo | cut -d '/' -f 4`
file=$dir/$file
git clone $repo $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment