#!/bin/sh

# directories
cd $HOME
mkdir bin misc tmp Projects Gits

# remember token
git config --global credential.helper cache
echo "97453163f195ae988657fc1ef4943bddd08705a9"

# ProbeStar stuff
mkdir -p ProbeStar
cd ProbeStar
rm -rf AutoSecurity CyberSecurity Database
for i in Cnomicon Cybersecurity KnowledgeBase Pynomicon Radio Robotics Software git_tools linux_tools pi_tools windows_tools
do
  echo "ProbeStar: $i"
  if [ -d $i ]; then
    rm -rf $i
  fi
  git clone https://github.com/nprobert/$i --recursive
  cd ..
  ln -fs ProbeStar/$i
  cd ProbeStar
done
cd $HOME
rm -f CyberSecurity Database CyVehicle
cp linux_tools/bin/* ~/bin

# NTCNA stuff
cd $HOME
mkdir NTCNA
cd NTCNA
for i in CInfrastructure CVehicle PyVehicle RosVehicle
do
  echo "NTCNA: $i"
  if [ -d $i ]; then
    rm -rf $i
  fi
  git clone https://github.com/nprobert/$i
done
cd $HOME
for i in CInfrastructure CVehicle PyVehicle RosVehicle
do
  ln -fs NTCNA/$i $i
done

exit 0
