sync/gitlabTest.sh

29 lines
676 B
Bash
Executable File

#!/bin/bash
green='\e[0;32m'
close='\e[0m'
mkdir -p /tmp/tests
echo -e "${green}Making test directories${close}"
cd /tmp/tests
mkdir a
mkdir b
cd /tmp/tests/a
git init
git remote add origin git@98.26.78.121:hitchhikers/Zaphod.git
echo -e "${green}SSH cloning${close}"
git pull origin master
echo -e "${green}"
ls
echo -e "${close}"
cd /tmp/tests/b
git init
git remote add origin https://98.26.78.121/gitlab/hitchhikers/Zaphod.git
git config http.sslVerify false
echo -e "${green}HTTPS cloning${close}"
git pull origin master
echo -e "${green}"
ls
echo -e "${close}"
echo -e "${green}Removing test directories${close}"
rm -rf /tmp/tests
echo -e "${green}Done testing!${close}"