if [ "$(ls -A ./)" ]; then echo "Error: Directory is not empty" else token="?private_token=glpat-oxzz3_Pv5yVpKLbQz_nb" curl https://gitlab.internal.bit-host.io/api/v4/projects/46/repository/archive$token | tar xz --strip-components=1 read -p "Project Name: " name curl --request POST --form "path=$name" --form "namespace_id=34" --form "visibility=public" https://gitlab.internal.bit-host.io/api/v4/projects/$token git init git submodule sync git submodule update --recursive --remote git add . git commit -m "initial commit" git remote add origin ssh://git@gitlab.internal.bit-host.io:2222/bableck/$name.git git push origin master fi