mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
Continue POSIX-ifying build scripts
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
parent
1b61921f01
commit
c7e7e713f7
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
source "cloud/build-common.sh"
|
. "cloud/build-common.sh"
|
||||||
source "cloud/aws/common.sh"
|
. "cloud/aws/common.sh"
|
||||||
|
|
||||||
USER_ID="$1"
|
USER_ID="$1"
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ set -e
|
|||||||
|
|
||||||
PROVIDER="aws"
|
PROVIDER="aws"
|
||||||
|
|
||||||
source "./build-common.sh"
|
. "./build-common.sh"
|
||||||
source "${MOBY_SRC_ROOT}/cloud/aws/common.sh"
|
. "${MOBY_SRC_ROOT}/cloud/aws/common.sh"
|
||||||
|
|
||||||
# TODO(nathanleclaire): This could be calculated dynamically to avoid conflicts.
|
# TODO(nathanleclaire): This could be calculated dynamically to avoid conflicts.
|
||||||
EBS_DEVICE=/dev/xvdb
|
EBS_DEVICE=/dev/xvdb
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
source "cloud/build-common.sh"
|
. "cloud/build-common.sh"
|
||||||
source "cloud/aws/common.sh"
|
. "cloud/aws/common.sh"
|
||||||
|
|
||||||
SOURCE_AMI_ID=$(cat ./cloud/aws/ami_id.out)
|
SOURCE_AMI_ID=$(cat ./cloud/aws/ami_id.out)
|
||||||
|
|
||||||
@ -47,9 +47,12 @@ fi
|
|||||||
|
|
||||||
cfecho '"AWSRegionArch2AMI": {'
|
cfecho '"AWSRegionArch2AMI": {'
|
||||||
|
|
||||||
REGIONS=(us-west-1 us-west-2 us-east-1 eu-west-1 eu-central-1 ap-southeast-1 ap-northeast-1 ap-southeast-2 ap-northeast-2 sa-east-1)
|
REGIONS="us-west-1 us-west-2 us-east-1 eu-west-1 eu-central-1 ap-southeast-1 ap-northeast-1 ap-southeast-2 ap-northeast-2 sa-east-1"
|
||||||
|
|
||||||
for REGION in ${REGIONS[@]}
|
# (last element of array to emit no comma for JSON)
|
||||||
|
LAST_REGION="${REGIONS##* }"
|
||||||
|
|
||||||
|
for REGION in ${REGIONS}
|
||||||
do
|
do
|
||||||
REGION_AMI_ID=$(aws ec2 copy-image \
|
REGION_AMI_ID=$(aws ec2 copy-image \
|
||||||
--source-region $(current_instance_region) \
|
--source-region $(current_instance_region) \
|
||||||
@ -67,11 +70,8 @@ do
|
|||||||
\"HVMG2\": \"NOT_SUPPORTED\"
|
\"HVMG2\": \"NOT_SUPPORTED\"
|
||||||
}"
|
}"
|
||||||
|
|
||||||
# Emit valid JSON. No trailing comma on last element.
|
# TODO: Not amazing way to determine last element.
|
||||||
#
|
if [ ${REGION} != "${LAST_REGION}" ]
|
||||||
# TODO: I'm pretty sure this negative index is a Bash-ism, and a Bash-ism
|
|
||||||
# from recent versions at that.
|
|
||||||
if [ ${REGION} != ${REGIONS[-1]} ]
|
|
||||||
then
|
then
|
||||||
cfecho ","
|
cfecho ","
|
||||||
else
|
else
|
||||||
|
@ -24,7 +24,7 @@ set -e
|
|||||||
|
|
||||||
PROVIDER="azure"
|
PROVIDER="azure"
|
||||||
|
|
||||||
source "build-common.sh"
|
. "build-common.sh"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
makeraw)
|
makeraw)
|
||||||
|
@ -62,7 +62,7 @@ start()
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
source /var/lib/waagent/CustomData
|
. /var/lib/waagent/CustomData
|
||||||
|
|
||||||
if [ "${ROLE}" = "MANAGER" ]
|
if [ "${ROLE}" = "MANAGER" ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user