blob: a9c24044b46984e3a4ba371a6c4d02671548f1d2 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/bin/bash
##############################################################################
# Copyright (c) 2016 ZTE Coreporation and others.
# hu.zhijiang@zte.com.cn
# sun.jing22@zte.com.cn
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
output_dir = "$1"
echo "#########################################################"
echo " systemctl info: "
echo "#########################################################"
echo "###Uname:"
uname
echo "###Hostname:"
hostname
maxcount=3
cnt=0
rc=1
while [ $cnt -lt $maxcount ] && [ $rc -ne 0 ]
do
cnt=$[cnt + 1]
echo -e "\n\n\n*** Starting build attempt # $cnt"
mkdir daisy-dir
cd daisy-dir
git clone https://git.openstack.org/openstack/daisycloud-core
cd daisycloud-core/tools
make allrpm
echo "######################################################"
echo " done "
echo "######################################################"
rc=$?
if [ $rc -ne 0 ]; then
echo "### Build failed with rc $rc ###"
else
echo "### Build successful at attempt # $cnt"
fi
done
cd daisy-dir
mv daisycloud-core/target/el7/noarch/installdaisy_el7_noarch.bin output_dir
exit $rc
|