Show More
@@ -7,6 +7,20 b'' | |||||
7 | # - CentOS 5 |
|
7 | # - CentOS 5 | |
8 | # - centOS 6 |
|
8 | # - centOS 6 | |
9 |
|
9 | |||
|
10 | BUILD=1 | |||
|
11 | while [ "$1" ]; do | |||
|
12 | case "$1" in | |||
|
13 | --prepare ) | |||
|
14 | shift | |||
|
15 | BUILD= | |||
|
16 | ;; | |||
|
17 | * ) | |||
|
18 | echo "Invalid parameter $1!" 1>&2 | |||
|
19 | exit 1 | |||
|
20 | ;; | |||
|
21 | esac | |||
|
22 | done | |||
|
23 | ||||
10 | cd "`dirname $0`/.." |
|
24 | cd "`dirname $0`/.." | |
11 |
|
25 | |||
12 | specfile=contrib/mercurial.spec |
|
26 | specfile=contrib/mercurial.spec | |
@@ -95,9 +109,14 b' for l in sys.stdin.readlines():' | |||||
95 |
|
109 | |||
96 | fi |
|
110 | fi | |
97 |
|
111 | |||
98 | rpmbuild --define "_topdir $rpmdir" -ba $rpmspec --clean |
|
112 | if [ "$BUILD" ]; then | |
99 | if [ $? = 0 ]; then |
|
113 | rpmbuild --define "_topdir $rpmdir" -ba $rpmspec --clean | |
100 | echo |
|
114 | if [ $? = 0 ]; then | |
101 | echo "Packages are in $rpmdir:" |
|
115 | echo | |
102 | ls -l $rpmdir/*RPMS/* |
|
116 | echo "Built packages for $version-$release:" | |
|
117 | find $rpmdir/*RPMS/ -type f -newer $rpmspec | |||
|
118 | fi | |||
|
119 | else | |||
|
120 | echo "Prepared sources for $version-$release $rpmspec are in $rpmdir/SOURCES/ - use like:" | |||
|
121 | echo "rpmbuild --define '_topdir $rpmdir' -ba $rpmspec --clean" | |||
103 | fi |
|
122 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now