Skip to content

Commit

Permalink
chore: remove logs from configure.sh (#3913)
Browse files Browse the repository at this point in the history
* remove log line

Signed-off-by: Pablo Hernán Carle <[email protected]>

* add java to PATH in configure.sh

Signed-off-by: MarkAckert <[email protected]>

* fix potential encoding issues for static definition

Signed-off-by: MarkAckert <[email protected]>

---------

Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: MarkAckert <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: MarkAckert <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent 1f884ea commit bd12477
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions discovery-package/src/main/resources/bin/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ if [ -z "$ZWE_zowe_workspaceDirectory" ]; then
exit 1
fi

echo "$(env)" > $ZWE_zowe_workspaceDirectory/api-mediation/api-defs/env

INSTANCE_ID=$ZWE_haInstance_id

if [ -z "$INSTANCE_ID" ]; then
Expand All @@ -33,12 +31,20 @@ if [ "$ZWE_zowe_network_client_tls_attls" = "true" ]; then
ZOSMF_SCHEME=http
fi

if [ -n "$JAVA_HOME" ]; then
PATH=$JAVA_HOME/bin:$PATH
elif [ -n "$ZWE_java_home" ]; then
PATH=$ZWE_java_home/bin:$PATH
else
echo "[discovery-configure.sh]: java_home not found, discovery service relying on PATH to find java"
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
# _BPXK_AUTOCVT is set on some systems and resulted in twice-converted files when run through chtag and sed
_BPXK_AUTOCVT="OFF" sed -W filecodeset=ISO8859-1 -e "s|%ZOSMF_SCHEME%|${ZOSMF_SCHEME}|g" $SOURCE_FILE >$DEST_FILE # implicit EBCDIC out
iconv -f IBM-1047 -t ISO8859-1 $DEST_FILE >$SOURCE_FILE
_BPXK_AUTOCVT="OFF" chtag -tc ISO8859-1 $SOURCE_FILE
rm -f $DEST_FILE
else
echo "File $SOURCE_FILE not found"
echo "[discovery-configure.sh]: File $SOURCE_FILE not found"
fi

0 comments on commit bd12477

Please sign in to comment.