-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pablo Hernán Carle <pablo.carle@broadcom.com> Co-authored-by: Pablo Hernán Carle <pablo.carle@broadcom.com>
- Loading branch information
1 parent
bb73f80
commit 8917d1f
Showing
5 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
################################################################################ | ||
# This program and the accompanying materials are made available under the terms of the | ||
# Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-v20.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Copyright IBM Corporation 2021 | ||
################################################################################ | ||
|
||
if [ -z "$ZWE_zowe_workspaceDirectory" ]; then | ||
echo "Workspace directory is not defined" | ||
exit 1 | ||
fi | ||
|
||
echo "$(env)" > $ZWE_zowe_workspaceDirectory/api-mediation/api-defs/env | ||
|
||
INSTANCE_ID=$ZWE_haInstance_id | ||
|
||
if [ -z "$INSTANCE_ID" ]; then | ||
SOURCE_FILE=$ZWE_zowe_workspaceDirectory/api-mediation/api-defs/discovery.zosmf_static_definition_yaml_template.yml | ||
else | ||
SOURCE_FILE=$ZWE_zowe_workspaceDirectory/api-mediation/api-defs/discovery.zosmf_static_definition_yaml_template.$INSTANCE_ID.yml | ||
fi | ||
|
||
DEST_FILE="$ZWE_zowe_workspaceDirectory/api-mediation/api-defs/zosmf.temp" | ||
|
||
ZOSMF_SCHEME=https | ||
|
||
if [ "$ZWE_zowe_network_client_tls_attls" = "true" ]; then | ||
ZOSMF_SCHEME=http | ||
fi | ||
|
||
if [ -e "$SOURCE_FILE" ]; then | ||
chtag -tc ISO8859-1 $SOURCE_FILE | ||
sed -e "s|%ZOSMF_SCHEME%|${ZOSMF_SCHEME}|g" $SOURCE_FILE > $DEST_FILE | ||
iconv -f IBM-1047 -t ISO8859-1 $DEST_FILE > $SOURCE_FILE | ||
chtag -tc ISO8859-1 $SOURCE_FILE | ||
rm -f $DEST_FILE | ||
else | ||
echo "File $SOURCE_FILE not found" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters