2011-03-12 03:43:54 +01:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
|
# $Id: memo,v 1.29 2010/12/14 15:14:46 gilles Exp gilles $
|
2011-03-12 03:43:54 +01:00
|
|
|
|
|
|
|
|
|
software_version() {
|
|
|
|
|
|
|
|
|
|
VERSION=`cat VERSION`
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2011-03-12 03:45:02 +01:00
|
|
|
|
statistics_lfo() {
|
2011-03-12 03:45:04 +01:00
|
|
|
|
# 62.147.165.21 - - [31/Oct/2010:23:45:28 +0100] "GET /prj/imapsync/VERSION HTTP/1.0" 200 6 "-" "imapsync/1.368 (linux system, perl 5.8.8, Mail::IMAPClient 2.2.9 imapsync)"
|
2011-03-12 03:45:02 +01:00
|
|
|
|
#grep prj/imapsync/VERSION /usr/local/apache/logs/access_log | sort -n | cut -d ' ' -f 1,12,13|uniq -c | sort -n # list ip
|
|
|
|
|
|
|
|
|
|
cat <<EOFF
|
2011-03-12 03:45:04 +01:00
|
|
|
|
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 1,12,13,18,19|sort -n|uniq -c|sort -n # list ip
|
|
|
|
|
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 1,12,13,18,19|sort -n|uniq -c|sort -n |grep MSWin32 # Win32
|
2011-03-12 03:45:02 +01:00
|
|
|
|
|
2011-03-12 03:45:04 +01:00
|
|
|
|
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 13,18,19 |sort -n|uniq -c| sort -n # OS usage+basename
|
|
|
|
|
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 12 |sort -n|uniq -c| sort -n # imapsync release
|
2011-03-12 03:45:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tail -f /usr/local/apache/logs/access_log|cat -n|grep prj/imapsync/VERSION|cat -n |grep VERSION # lfo frequency'
|
|
|
|
|
EOFF
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 03:43:54 +01:00
|
|
|
|
niouzes_compil() {
|
2011-03-12 03:45:04 +01:00
|
|
|
|
(
|
|
|
|
|
cd /g/public_html/www.linux-france.org/html/
|
2011-03-12 03:43:54 +01:00
|
|
|
|
m4 niouzes.m4 > niouzes.xml
|
|
|
|
|
python ./niouzes/getmynews.py --neuf niouzes.xml > niouzes-neuf.html
|
|
|
|
|
python ./niouzes/getmynews.py --html niouzes.xml > niouzes-html.html
|
2011-03-12 03:45:04 +01:00
|
|
|
|
)
|
2011-03-12 03:43:54 +01:00
|
|
|
|
}
|
|
|
|
|
|
2011-03-12 03:44:35 +01:00
|
|
|
|
|
|
|
|
|
|
2011-03-12 03:43:54 +01:00
|
|
|
|
lfo_announce() {
|
|
|
|
|
software_version
|
2011-03-12 03:45:04 +01:00
|
|
|
|
NEWS_FILE="/g/public_html/www.linux-france.org/html/niouzes/niouzes_imapsync.xml"
|
2011-03-12 03:43:54 +01:00
|
|
|
|
if ! newer VERSION $NEWS_FILE; then
|
|
|
|
|
echo "$VERSION already announced"
|
|
|
|
|
else
|
2011-03-12 03:43:55 +01:00
|
|
|
|
cat > $NEWS_FILE << EOF
|
2011-03-12 03:43:54 +01:00
|
|
|
|
|
|
|
|
|
<news date="`date '+%Y%m%d'`">
|
2011-03-12 03:44:35 +01:00
|
|
|
|
`LANG=fr_FR date '+%A %d %B %Y'` : Synchronisez ou migrez vos boites
|
|
|
|
|
aux lettres avec <20>conomie et l'outil <A
|
2011-03-12 03:43:54 +01:00
|
|
|
|
HREF="prj/imapsync/">imapsync $VERSION</A> (Gilles LAMIRAL)
|
|
|
|
|
</news>
|
|
|
|
|
EOF
|
|
|
|
|
fi
|
|
|
|
|
niouzes_compil
|
|
|
|
|
}
|
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
#' nedit sucks with syntax color
|
2011-03-12 03:44:27 +01:00
|
|
|
|
|
2011-03-12 03:44:35 +01:00
|
|
|
|
fm_init() {
|
2011-03-12 03:44:21 +01:00
|
|
|
|
software_version
|
2011-03-12 03:44:49 +01:00
|
|
|
|
NEWS_FILE_FM="./freshmeat_submition"
|
2011-03-12 03:44:27 +01:00
|
|
|
|
NEWS_FILE_FM_INP=${NEWS_FILE_FM}.inp
|
2011-03-12 03:45:02 +01:00
|
|
|
|
NEWS_FILE_FM_OUT=${NEWS_FILE_FM}.json
|
2011-03-12 03:44:35 +01:00
|
|
|
|
}
|
2011-03-12 03:44:27 +01:00
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
fm_read_param() {
|
|
|
|
|
# read definitions
|
|
|
|
|
. $NEWS_FILE_FM_INP
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 03:44:35 +01:00
|
|
|
|
fm_read_announce() {
|
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
fm_init
|
|
|
|
|
fm_read_param
|
2011-03-12 03:44:35 +01:00
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
cat << EOF
|
2011-03-12 03:45:02 +01:00
|
|
|
|
{
|
|
|
|
|
"release": {
|
|
|
|
|
"tag_list": "stable, $RELEASE_FOCUS",
|
|
|
|
|
"version": "$VERSION",
|
|
|
|
|
"hidden_from_frontpage": false,
|
|
|
|
|
"changelog": "$TEXT_BODY"
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-03-12 03:44:27 +01:00
|
|
|
|
|
2011-03-12 03:44:21 +01:00
|
|
|
|
EOF
|
2011-03-12 03:44:35 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fm_announce() {
|
2011-03-12 03:44:49 +01:00
|
|
|
|
fm_init
|
2011-03-12 03:44:35 +01:00
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
if ! newer VERSION $NEWS_FILE_FM_OUT; then
|
2011-03-12 03:44:35 +01:00
|
|
|
|
echo "$VERSION already submitted on freshmeat"
|
2011-03-12 03:44:49 +01:00
|
|
|
|
else
|
2011-03-12 03:44:35 +01:00
|
|
|
|
if newer VERSION $NEWS_FILE_FM_INP; then
|
|
|
|
|
echo "Update $NEWS_FILE_FM_INP please"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
fm_read_announce > $NEWS_FILE_FM_OUT
|
2011-03-12 03:45:02 +01:00
|
|
|
|
curl -X PUT -d @../../var/pass/secret.freshmeat -d @$NEWS_FILE_FM_OUT \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
http://freshmeat.net/projects/imapsync.json
|
|
|
|
|
|
2011-03-12 03:44:49 +01:00
|
|
|
|
fi
|
2011-03-12 03:44:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|