Fixed initial clone command

This commit is contained in:
Nicole Rappe 2023-09-22 03:12:15 -06:00
parent eb02daf2ba
commit 704071f485

View File

@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
while true; do while true; do
# Make DATA directory at root directory
mkdir -p /DATA
# Set Git credentials # Set Git credentials
git config --global credential.helper 'store --file /tmp/git-credentials' git config --global credential.helper 'store --file /tmp/git-credentials'
echo "url=$REPO_URL" > /tmp/git-credentials echo "url=$REPO_URL" > /tmp/git-credentials
@ -14,7 +11,7 @@ while true; do
cd /root/Repo_Watcher cd /root/Repo_Watcher
# Clone the repo if it doesn't exist # Clone the repo if it doesn't exist
if [ -z "$(find repo -maxdepth 0 -type f -o -type d 2>/dev/null)" ]; then if [ -z "$(find /root/Repo_Watcher/repo -maxdepth 1 -mindepth 1 -type f -o -type d 2>/dev/null)" ]; then
curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL
echo "Repository $REPO_URL doesn't exist locally - Downloading..." echo "Repository $REPO_URL doesn't exist locally - Downloading..."
git clone $REPO_URL repo git clone $REPO_URL repo