echo "#################################"
echo "##     Installing SSH Key.    ###"
echo "#################################"
echo -n "Enter your username on apollo: " 
read APOLLO
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<< y
ssh-copy-id $APOLLO@140.114.91.183

# Install bashrc
git config --global http.sslverify false
curl -o ~/.bashrc https://apollo.cs.nthu.edu.tw/pp24/share/script/bashrc-remote
echo "source ~/.bashrc" >> ~/.bash_profile
curl -o ~/.git-prompt.sh https://apollo.cs.nthu.edu.tw/pp24/share/script/git-prompt.sh
echo "alias hw4-remote-judge='hw4-remote-judge --as $APOLLO'" >> ~/.bashrc

echo "###################################"
echo "##       Install completed      ###"
echo "## Please relogin the container ###"
echo "###################################"

