forked from openresty/openresty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-nginx.sh
executable file
·36 lines (32 loc) · 800 Bytes
/
package-nginx.sh
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/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
cd nginx || exit 1
git reset --hard || exit 1
git checkout master || exit 1
git pull --force || exit 1
cd .. || exit 1
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
#ls -lh ~/work/nginx-$ver.tar.gz
scp nginx-$ver.tar.gz openresty.org:/home/agentz/www/agentzh/misc/nginx/