File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616# specific language governing permissions and limitations
1717# under the License.
1818
19+ set -e
20+
1921# Adjust user and group provided by host
2022adjust_owner () {
2123 # if both set then change the owner
@@ -36,18 +38,20 @@ if [ ! -f "/mnt/build/cloudstack/packaging/build-deb.sh" ]; then
3638 exit 1
3739fi
3840
39- # do the packaging
40- bash -x /mnt/build/cloudstack/packaging/build-deb.sh $@
41+ {
42+ # do the packaging
43+ bash -x /mnt/build/cloudstack/packaging/build-deb.sh $@ && {
44+ mkdir -p /mnt/build/cloudstack/dist/debbuild/DEBS
4145
42- if [ $? -eq 0 ] ; then
43- mkdir -p /mnt/build/cloudstack/dist/debbuild/DEBS
46+ cp /mnt/build/cloudstack- * .deb /mnt/build/cloudstack/dist/debbuild/DEBS
47+ cp /mnt/build/cloudstack_ * .changes /mnt/build/cloudstack/dist/debbuild/DEBS
4448
45- cp /mnt/build/cloudstack-* .deb /mnt/build/cloudstack/dist/debbuild/DEBS
46- cp /mnt/build/cloudstack_* .changes /mnt/build/cloudstack/dist/debbuild/DEBS
49+ adjust_owner
50+ }
51+ } || {
52+ status=$?
4753
4854 adjust_owner
49- else
50- adjust_owner
5155 echo " Packaging DEB failed"
52- exit $?
53- fi
56+ exit $status
57+ }
Original file line number Diff line number Diff line change 1616# specific language governing permissions and limitations
1717# under the License.
1818
19+ set -e
20+
1921# Adjust user and group provided by host
2022adjust_owner () {
2123 # if both set then change the owner
@@ -36,18 +38,20 @@ if [ ! -f "/mnt/build/cloudstack/packaging/build-deb.sh" ]; then
3638 exit 1
3739fi
3840
39- # do the packaging
40- bash -x /mnt/build/cloudstack/packaging/build-deb.sh $@
41+ {
42+ # do the packaging
43+ bash -x /mnt/build/cloudstack/packaging/build-deb.sh $@ && {
44+ mkdir -p /mnt/build/cloudstack/dist/debbuild/DEBS
4145
42- if [ $? -eq 0 ] ; then
43- mkdir -p /mnt/build/cloudstack/dist/debbuild/DEBS
46+ cp /mnt/build/cloudstack- * .deb /mnt/build/cloudstack/dist/debbuild/DEBS
47+ cp /mnt/build/cloudstack_ * .changes /mnt/build/cloudstack/dist/debbuild/DEBS
4448
45- cp /mnt/build/cloudstack-* .deb /mnt/build/cloudstack/dist/debbuild/DEBS
46- cp /mnt/build/cloudstack_* .changes /mnt/build/cloudstack/dist/debbuild/DEBS
49+ adjust_owner
50+ }
51+ } || {
52+ status=$?
4753
4854 adjust_owner
49- else
50- adjust_owner
5155 echo " Packaging DEB failed"
52- exit $?
53- fi
56+ exit $status
57+ }
You can’t perform that action at this time.
0 commit comments