Skip to content

Commit 36a4275

Browse files
authored
Added pull-git.sh
For git support
1 parent 4c1dec4 commit 36a4275

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pull-git.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# [Git] Check if Git is installed and pull the latest changes in the 'www' folder
4+
if command -v git > /dev/null 2>&1; then
5+
echo "[Git] Pulling latest changes for the 'www' folder"
6+
cd /home/container/www
7+
8+
if [ -d .git ]; then
9+
git pull || echo "[Git] Failed to pull latest changes for the 'www' folder"
10+
else
11+
echo "[Git] No Git repository found in the 'www' folder, skipping pull"
12+
fi
13+
else
14+
echo "[Git] Git is not installed, skipping Git pull"
15+
fi

0 commit comments

Comments
 (0)