1
0
mirror of https://github.com/php/systems.git synced 2026-03-23 23:32:12 +01:00
Files
archived-systems/update-phpweb-backend
2024-02-07 16:52:38 +00:00

39 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# phpweb has some hardcoded files in the repo for development purposes
# these need to be overwritten by the update-backend script to fetch new content
/local/mirrors/php-main-web/scripts/update-backend /local/repos/phpweb
rsync -qrltDvzC --exclude=".git" --exclude="manual/en" /local/repos/phpweb/ /local/mirrors/phpweb
if ls /local/mirrors/manual-chms/*.chm > /dev/null 2> /dev/null; then
for i in /local/mirrors/manual-chms/*.chm; do
cp -p $i /local/mirrors/phpweb/distributions/manual
done
fi
# get manual notes
mkdir -p /local/mirrors/manual-notes.new
/local/mirrors/php-main-web/scripts/update-user-notes \
/local/mirrors/manual-notes.new
if [ $? -eq 0 ]; then
rm -rf /local/mirrors/manual-notes
mv /local/mirrors/manual-notes.new /local/mirrors/manual-notes
else
rm -rf /local/mirrors/manual-notes.new
fi
find /local/mirrors/manual-notes -type f | \
xargs head -1 -q | cut -d '|' -f 2 | sort \
> /local/mirrors/manual-notes/sections
date +"%s" > /local/mirrors/manual-notes/last-updated
rsync -a --delete --delete-after \
/local/mirrors/manual-notes/ /local/mirrors/phpweb/backend/notes/
DATE=`date +"%s"`
echo "<?php \$LAST_UPDATED=$DATE; ?>" \
> /local/mirrors/phpweb/include/last_updated.inc