4 PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
19 Usage: builder [-V] [--version] [-a] [--as_anon] [-b] [--build]
20 [-d <cvsroot>] [--cvsroot <cvsroot>] [-g] [--get] [-h] [--help]
21 [-l <logfile>] [--logtofile <logfile>] [-q] [--quiet]
22 [-v] [--verbose] <package>.spec
24 -V, --version - output builder version
25 -a, --as_anon - get files via pserver as cvs@cvs.pld.org.pl,
26 -b, --build - get all files from CVS repo and build
27 package from <package>.spec,
28 -d, --cvsroot - setup \$CVSROOT,
29 -g, --get - get <package>.spec and all relayted files from
31 -h, --help - this message,
32 -l, --logtofile - log all to file,
33 -q, --quiet - be quiet,
34 -v, --verbose - be verbose,
41 sed -e 's#^%prep#%dump#' ${SPECFILE} > $SPECFILE.__
43 SOURCES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ SOURCE[0-9]+/ {print $3}'`"
44 PATCHES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PATCH[0-9]+/ {print $3}'`"
45 ICON="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/^Icon:/ {print $2}' ${SPEC}`"
46 PACKAGE_NAME="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ name/ {print $3}'`"
47 PACKAGE_VERSION="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_VERSION/ {print $3}'`"
48 PACKAGE_RELEASE="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_RELEASE/ {print $3}'`"
52 if [ "$BE_VERBOSE" != "" ]; then
53 echo -e "- Sources :\n " $SOURCES
54 echo -e "- Patches :\n " $PATCHES
55 if [ "$ICON" != "" ]; then
56 echo -e "- Icon :\n " $ICON
58 echo -e "- Icon : *no package icon*"
60 echo -e "- Name : " $PACKAGE_NAME
61 echo -e "- Version : " $PACKAGE_VERSION
62 echo -e "- Release : " $PACKAGE_RELEASE
81 while test $# -gt 0 ; do
92 COMMAND="get"; shift ;;
94 COMMAND="usage"; shift ;;
100 BE_VERBOSE="1"; shift ;;
102 SPECFILE="${1}"; shift ;;
108 if [ "$SPECFILE" != "" ]; then
114 echo "ERROR: spec file name not specified.";
119 if [ "$SPECFILE" != "" ]; then
124 echo "ERROR: spec file name not specified.";