23 lines
610 B
Bash
Executable File
23 lines
610 B
Bash
Executable File
#!/bin/bash
|
|
|
|
file="./templates/openring.html"
|
|
if [ -e "$file" ]; then
|
|
file_time=$(date -r "$file" +%s)
|
|
tempo_max=$(date -d '16 hours ago' +%s)
|
|
fi
|
|
|
|
if [ ! -e "$file" ] || (( $file_time < $tempo_max )); then
|
|
cd openring
|
|
./openring -S "feeds.txt" -n 5 < "in.html" > "../templates/openring.html"
|
|
./openring_it -S "feeds-it.txt" -n 5 < "in_it.html" > "../templates/openringit.html"
|
|
cd ..
|
|
else
|
|
echo "Feed generato troppo di recente. Operazione saltata."
|
|
fi
|
|
|
|
git add --all
|
|
git commit -S -m "Aggiornamento semi-automatico $(date +%Y-%m-%dT%H:%M:%S%Z)"
|
|
git push -u origin master
|
|
|
|
zola build
|