2015-10-30 13:29:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. ./util/ver
|
|
|
|
ver=$main_ver
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
if [ ! -d nginx ]; then
|
|
|
|
echo "../nginx/ not found." > /dev/stderr
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ ! -d nginx/.git ]; then
|
|
|
|
echo "../nginx/.git not found." > /dev/stderr
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-11-24 14:37:40 +00:00
|
|
|
cd nginx || exit 1
|
|
|
|
git pull --force || exit 1
|
|
|
|
cd .. || exit 1
|
|
|
|
|
2015-10-30 13:29:48 +00:00
|
|
|
rm -rf nginx-$ver
|
|
|
|
rm -f nginx-$ver.tar.gz
|
|
|
|
git clone nginx nginx-$ver || exit 1
|
|
|
|
cd nginx-$ver/ || exit 1
|
|
|
|
git co release-$ver || exit 1
|
|
|
|
rm -rf .git || exit 1
|
|
|
|
rm .hgtags || exit 1
|
|
|
|
mv docs/text/README ./ || exit 1
|
|
|
|
mv auto/configure ./ || exit 1
|
|
|
|
rm -rf src/mysql || exit 1
|
|
|
|
cd ..
|
|
|
|
tar czvf nginx-$ver.tar.gz nginx-$ver || exit 1
|
|
|
|
ls -lh ./nginx-$ver.tar.gz
|
2015-11-24 14:37:40 +00:00
|
|
|
#ls -lh ~/work/nginx-$ver.tar.gz
|
2015-10-30 13:29:48 +00:00
|
|
|
scp nginx-$ver.tar.gz agentzh.org:~/www/agentzh/misc/nginx/
|