#!/bin/env sh


setupGitRepositories() {

  declare -A repositories

  repositories['DSA']="ssh://git.php.fail/neintonine/dsa.git"
  repositories['Notes']="ssh://git.php.fail/neintonine/notes.git"
  repositories['gameconcepts']="ssh://git.php.fail/neintonine/game-concepts.git"
  for path in "${!repositories[@]}"; do
    url=${repositories[$path]}

    realPath="${HOME}/$path"
    if [ -d "$realPath" ]; then 
      echo "-- $realPath already exist... skipping clone"
      continue
    fi

    echo "-- Cloning to $realPath";
    git clone "$url" "$realPath"
  done
}

addActions setupGitRepositories
