Skip to content

Commit

Permalink
Reduce duplicate code in each init phase
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs authored and MarkAckert committed Dec 11, 2024
1 parent 2757408 commit e2d2073
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bin/commands/init/mvs/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,22 @@ while read -r line; do
else
print_error_and_exit "Error ZWEL0157E: ${name} (zowe.setup.dataset.${key}) is not defined in Zowe YAML configuration file." "" 157
fi
elif [ "${key}" = "authLoadlib" ]; then
if [ "${ds}" = "${prefix}.SZWESAMP" ]; then
fi

if [ "${key}" = "authLoadlib" ]; then
if [ "${ds}" = "${prefix}.SZWEAUTH" ]; then
run_aloadlib_create="false"
else
run_aloadlib_create="true"
# check existence
ds_existence=$(is_data_set_exists "${ds}")
if [ "${ds_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
print_message "Warning ZWEL0300W: ${ds} already exists. Members in this data set will be overwritten."
else
print_message "Warning ZWEL0301W: ${ds} already exists and will not be overwritten. For upgrades, you must use --allow-overwrite."
fi
fi
fi
fi

Expand Down
1 change: 1 addition & 0 deletions bin/libs/zos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ verify_generated_jcl() {
result=$(zwecli_inline_execute_command init generate)
fi

# should be created, but may take time to discover.
if [ -z "${does_jcl_exist}" ]; then
does_jcl_exist=
for secs in 1 5 10 ; do
Expand Down

0 comments on commit e2d2073

Please sign in to comment.