28 lines
524 B
Bash
28 lines
524 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
PROJECTNAME=$(basename "$(pwd)")
|
||
|
SETGITEA=true
|
||
|
|
||
|
# Verify the .env file exists
|
||
|
if [ ! -f ".env" ]; then
|
||
|
echo "Error: The .env file does not exist."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Load environment variables from .env file
|
||
|
set -o allexport
|
||
|
source .env
|
||
|
set +o allexport
|
||
|
|
||
|
# Run Git setup
|
||
|
bash bin/inc_new_project/git_setup.sh
|
||
|
|
||
|
if [ "$GITEA_API_URL" = "REPLACEME" ]; then
|
||
|
SETGITEA=false
|
||
|
fi
|
||
|
|
||
|
# Run remote Git setup
|
||
|
if [ "$SETGITEA" = "true" ]; then
|
||
|
bash bin/inc_new_project/remote_git_setup.sh
|
||
|
fi
|
||
|
echo -e "\e[32mAll Done\e[0m";
|