Skip to content

Commit d15b5e9

Browse files
committed
small fixes for the aws script
1 parent 9515ce4 commit d15b5e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/aws_tests.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ create_key_pair() {
102102

103103
echo "Creating new AWS key pair named ${KEY_NAME}"
104104
mkdir -p ~/.ssh
105+
[ -f "$KEY_PATH" ] && rm -f "$KEY_PATH"
105106
aws ec2 create-key-pair --key-name "$KEY_NAME" \
106107
--query 'KeyMaterial' --output text > "$KEY_PATH"
107108
chmod 400 "$KEY_PATH"
@@ -131,7 +132,8 @@ create_security_group() {
131132
--group-id "${CREATED_SECURITY_GROUP}" \
132133
--protocol tcp \
133134
--port 22 \
134-
--cidr 0.0.0.0/0
135+
--cidr 0.0.0.0/0 \
136+
--no-cli-pager
135137

136138
SECURITY_GROUP="${CREATED_SECURITY_GROUP}"
137139
echo "Created security group: ${SECURITY_GROUP}"
@@ -181,7 +183,7 @@ process_instance() {
181183
linux-tools-common linux-tools-generic g++ clang cmake python3
182184
183185
# Enable access to perf events for benchmarking
184-
# Must use `sudo tee` since shell redirection (`>`) is not affected by sudo
186+
# Must use 'sudo tee' since shell redirection ('>') is not affected by sudo
185187
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid > /dev/null
186188
187189
echo "Saving some info about the environment..."

0 commit comments

Comments
 (0)