File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
examples/virtual-hard-disk Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,23 @@ printf "\n=== Managing Virtual Hard Disks in Azure Compute ===\n"
5
5
printf " \n1. Creating a new resource group: %s and location: %s.\n" " $groupName " " $location "
6
6
azure group create -n " $groupName " --location " $location "
7
7
8
- printf " \n2. Creating a new storage account '%s' in type '%s'" " $storageAccountName " " $storageAccountType "
8
+ printf " \n2. Creating a new storage account '%s' in type '%s'.\n " " $storageAccountName " " $storageAccountType "
9
9
azure storage account new --resourcegroupname " $groupName " --name " $storageAccountName " --location " $location " --type " $storageAccountType "
10
10
11
- printf " \n3. Uploading a virtual hard disk to: %s" " $storageAccountName "
11
+ printf " \n3. Uploading a virtual hard disk to: %s.\n " " $storageAccountName "
12
12
azure vhd add -o --resourcegroupname " $groupName " --destination https://" $storageAccountName " .blob.core.windows.net/test/test.vhd --localfilepath $BASEDIR /test.vhd
13
13
14
14
printf " \n4. Downloading a virtual hard disk"
15
15
azure vhd save -o --resourcegroupname " $groupName " --sourceuri https://" $storageAccountName " .blob.core.windows.net/test/test.vhd --localfilepath ./test_downloaded_by_clu.vhd
16
16
17
- printf " \n5. Validating the downloaded file is the same"
17
+ printf " \n5. Validating the downloaded file is the same.\n "
18
18
diffResult=` diff ./test_downloaded_by_clu.vhd $BASEDIR /test_uploaded_byps.vhd`
19
+ if [ " $diffResult " = " " ]; then
20
+ echo " Checked"
21
+ else
22
+ echo " Different!" 1>&2
23
+ exit 1
24
+ fi
19
25
20
26
printf " \n6. Removing resource group: %s.\n" " $groupName "
21
27
azure group remove -n " $groupName " -f
You can’t perform that action at this time.
0 commit comments