-
Notifications
You must be signed in to change notification settings - Fork 29
/
update-phpweb-backend
executable file
·38 lines (29 loc) · 1.22 KB
/
update-phpweb-backend
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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