Fixed initial clone command
This commit is contained in:
parent
eb02daf2ba
commit
704071f485
@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
# Make DATA directory at root directory
|
||||
mkdir -p /DATA
|
||||
|
||||
# Set Git credentials
|
||||
git config --global credential.helper 'store --file /tmp/git-credentials'
|
||||
echo "url=$REPO_URL" > /tmp/git-credentials
|
||||
@ -14,7 +11,7 @@ while true; do
|
||||
cd /root/Repo_Watcher
|
||||
|
||||
# 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
|
||||
echo "Repository $REPO_URL doesn't exist locally - Downloading..."
|
||||
git clone $REPO_URL repo
|
||||
|
Loading…
x
Reference in New Issue
Block a user