4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 echo "Usage: $0 -m <manifest-dir> -w <work-dir> [-r <rpmbuilder-dir> -p <rpm-create-search-dir>]"
26 while getopts "m:w:p:r:" OPT; do
29 export MANIFEST_PATH=$(readlink -f $OPTARG)
35 export RPMBUILDER_PATH=$(readlink -f $OPTARG)
38 rpm_search_paths+=" $OPTARG"
46 [ -z "$MANIFEST_PATH" ] && usage
47 [ -z "$WORK" ] && usage
48 [ -n "$rpm_search_paths" -a -z "$RPMBUILDER_PATH" ] && usage
50 [ "$#" -ne 0 ] && usage
52 scriptdir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
53 source $scriptdir/lib.sh
58 $LIBDIR/create_manifest_rpm.sh
61 if [ -n "$rpm_search_paths" ]; then
62 $LIBDIR/build_rpms.sh $rpm_search_paths
66 $LIBDIR/build_step_create_yum_repo_files.sh
69 $LIBDIR/build_step_golden_image.sh
70 sha1short=$(grep -v product-manifest $RPMLISTS/rpmlist | sha1sum | cut -c-8)
73 $LIBDIR/build_step_create_install_cd.sh
75 echo "=== SUCCESS ==="
76 echo "Build results are in $WORKRESULTS"
77 echo "Installed RPMS checksum: ${sha1short} (this will change if list of installed RPMs changes)"