Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions engine/schema/templateConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function getChecksum() {

function createMetadataFile() {
local fileData=$(cat $SOURCEFILE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local fileData=$(cat $SOURCEFILE)
local fileData=$(cat "$SOURCEFILE")

echo -e "["default"]\nversion = $VERSION.${securityversion}\n" >> $METADATAFILE
echo -e "["default"]\nversion = $VERSION.${securityversion}\n" >> "$METADATAFILE"
for template in "${templates[@]}"
do
section="${template%%:*}"
Expand All @@ -64,7 +64,7 @@ function createMetadataFile() {
checksum=$(getChecksum "$fileData" "$VERSION-$hvName")
downloadurl="${template#*:}"
filename=$(echo ${downloadurl##*'/'})
echo -e "["$section"]\ntemplatename = $templatename\nchecksum = $checksum\ndownloadurl = $downloadurl\nfilename = $filename\n" >> $METADATAFILE
echo -e "["$section"]\ntemplatename = $templatename\nchecksum = $checksum\ndownloadurl = $downloadurl\nfilename = $filename\n" >> "$METADATAFILE"
done
}

Expand All @@ -79,7 +79,7 @@ templates=( "kvm:https://download.cloudstack.org/systemvm/${CS_VERSION}/systemvm

PARENTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/dist/systemvm-templates/"
mkdir -p $PARENTPATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p $PARENTPATH
mkdir -p "$PARENTPATH"

METADATAFILE=${PARENTPATH}"metadata.ini"
echo > $METADATAFILE
METADATAFILE="${PARENTPATH}metadata.ini"
echo > "$METADATAFILE"
SOURCEFILE=${PARENTPATH}'md5sum.txt'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SOURCEFILE=${PARENTPATH}'md5sum.txt'
SOURCEFILE="${PARENTPATH}md5sum.txt"

createMetadataFile