# clone the repository git clone https://git.nxs.solutions/Fast/gitea.git lib # ask the user for the location where to setup Fast read -p "Enter the full path where you want to set up Fast (e.g., /opt/gitea): " GITEA_PATH # if the user input is empty, use /opt/fast as default if [ -z "$GITEA_PATH" ]; then GITEA_PATH="/opt/gitea" fi # create the directory if it doesn't exist sudo mkdir -p "$GITEA_PATH" sudo cp -r lib/* $GITEA_PATH sudo rm -r lib sudo chown -R $USER:root $GITEA_PATH echo "Gitea has been set up at $GITEA_PATH" # write GITEA_PATH to fast .env source $USER/.bashrc if [ -z "$FAST_PATH" ]; then echo "FAST_PATH is not set. Please run setup_fast.sh first." exit 1 else echo "GITEA_PATH=$GITEA_PATH" >> $FAST_PATH/.env fi cd $GITEA_PATH ./setup.sh echo "Gitea setup script completed."