3e43fbd5b4
After the recent move [1] of diskimage-buidler elements the permissions where changed making the files non-executable. Make them executable again. [1] I98051da7e9c8f7943fb5fe2109989d66b4b03736 Change-Id: I8dc819470c3089beb62a76364d4b6b4ba6e12d34
30 lines
877 B
Bash
Executable File
30 lines
877 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2016 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
set -e
|
|
|
|
# check that image is valid
|
|
qemu-img check -q $1
|
|
|
|
# validate estimated size
|
|
FILESIZE=$(stat -c%s "$1")
|
|
MIN_SIZE=629145600 # 600MB
|
|
|
|
if [ $FILESIZE -lt $MIN_SIZE ] ; then
|
|
echo "Error: generated image size is lower than expected."
|
|
exit 1
|
|
fi
|