Skip to content

Commit dbf2181

Browse files
committed
crontab script to run on sccn server
1 parent e6ee5e7 commit dbf2181

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

code/plugins/update_plugins.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/bash
2-
3-
DIRECTORY="/path/to/directory"
4-
5-
if [ -d "$DIRECTORY" ]; then
6-
# Directory exists, pull changes
7-
cd "$DIRECTORY"
8-
git pull
9-
else
10-
# Directory doesn't exist, clone from GitHub
11-
git clone https://github.com/username/repository.git "$DIRECTORY"
12-
fi
2+
cd /home/dung/sccn.github.io
3+
git pull --rebase
4+
cd /home/dung/sccn.github.io/code/plugins
5+
python update_plugins.py
6+
git add -A && git commit -m "scheduled plugin update"
7+
git push

0 commit comments

Comments
 (0)