newsEN / sources / gennews.sh /
a04d04c 6 years ago
1 contributor
12 lines | 0.333kb
#!/bin/bash
cd /var/www/html/newsen/sources
echo "====== news.json"
php create-json.php > news.json 2> /dev/null
#E.g :
#php news-lemonde.fr.php > lemonde.html 2> /dev/null
for gen in $(ls news-*|grep -v constants)
do
  echo "====== $gen"
  output=$(echo $gen|cut -d'-' -f2|cut -d'.' -f1).html
  php $gen > $output 2> /dev/null
done