Skip to content

Commit

Permalink
crontab script to run on sccn server
Browse files Browse the repository at this point in the history
  • Loading branch information
dungscout96 committed Jul 25, 2024
1 parent e6ee5e7 commit dbf2181
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions code/plugins/update_plugins.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/bin/bash

DIRECTORY="/path/to/directory"

if [ -d "$DIRECTORY" ]; then
# Directory exists, pull changes
cd "$DIRECTORY"
git pull
else
# Directory doesn't exist, clone from GitHub
git clone https://github.com/username/repository.git "$DIRECTORY"
fi
cd /home/dung/sccn.github.io
git pull --rebase
cd /home/dung/sccn.github.io/code/plugins
python update_plugins.py
git add -A && git commit -m "scheduled plugin update"
git push

0 comments on commit dbf2181

Please sign in to comment.