Skip to content

Instantly share code, notes, and snippets.

@roderik
Created January 19, 2013 11:37
Show Gist options
  • Select an option

  • Save roderik/4572212 to your computer and use it in GitHub Desktop.

Select an option

Save roderik/4572212 to your computer and use it in GitHub Desktop.
#!/bin/bash
folder=$1
giturl=$2
echo "creating folder $folder"
mkdir -p "$folder"
echo "entering folder $folder"
cd "$folder"
if [[ -d "git-$folder" ]]; then
echo "removing old git checkout git-$folder"
rm -Rf "git-$folder"
fi
echo "git checkout git-folder does not exist, cloning $giturl"
git clone $giturl git-$folder
echo "entering git checkout git-$folder"
cd "git-$folder"
echo "running dexy"
dexy -r 2>&1
echo "rsyncing to the destination"
rsync -avh output-site/ ../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment