Skip to content

Commit

Permalink
Fix multi-line string indent
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Elovirta <jarno@elovirta.com>
  • Loading branch information
jelovirt committed Mar 25, 2024
1 parent bb47c96 commit d7a81ea
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions src/main/java/org/dita/dost/platform/Integrator.java
Expand Up @@ -712,34 +712,34 @@ private void writeStartcmdShell(final Collection<File> jars) {

out.write(
"""
#!/bin/sh
# Generated file, do not edit manually"
echo "NOTE: The startcmd.sh has been deprecated, use the 'dita' command instead."
realpath() {
case $1 in
/*) echo "$1" ;;
*) echo "$PWD/${1#./}" ;;
esac
}
if [ "${DITA_HOME:+1}" = "1" ] && [ -e "$DITA_HOME" ]; then
export DITA_DIR="$(realpath "$DITA_HOME")"
else #elif [ "${DITA_HOME:+1}" != "1" ]; then
export DITA_DIR="$(dirname "$(realpath "$0")")"
fi
if [ -f "$DITA_DIR"/bin/ant ] && [ ! -x "$DITA_DIR"/bin/ant ]; then
chmod +x "$DITA_DIR"/bin/ant
fi
export ANT_OPTS="-Xmx512m $ANT_OPTS"
export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl"
export ANT_HOME="$DITA_DIR"
export PATH="$DITA_DIR"/bin:"$PATH"
NEW_CLASSPATH="$DITA_DIR/lib:$NEW_CLASSPATH"
"""
#!/bin/sh
# Generated file, do not edit manually"
echo "NOTE: The startcmd.sh has been deprecated, use the 'dita' command instead."
realpath() {
case $1 in
/*) echo "$1" ;;
*) echo "$PWD/${1#./}" ;;
esac
}
if [ "${DITA_HOME:+1}" = "1" ] && [ -e "$DITA_HOME" ]; then
export DITA_DIR="$(realpath "$DITA_HOME")"
else #elif [ "${DITA_HOME:+1}" != "1" ]; then
export DITA_DIR="$(dirname "$(realpath "$0")")"
fi
if [ -f "$DITA_DIR"/bin/ant ] && [ ! -x "$DITA_DIR"/bin/ant ]; then
chmod +x "$DITA_DIR"/bin/ant
fi
export ANT_OPTS="-Xmx512m $ANT_OPTS"
export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl"
export ANT_HOME="$DITA_DIR"
export PATH="$DITA_DIR"/bin:"$PATH"
NEW_CLASSPATH="$DITA_DIR/lib:$NEW_CLASSPATH"
"""
);
for (final File relativeLib : jars) {
out.write("NEW_CLASSPATH=\"");
Expand All @@ -751,15 +751,15 @@ private void writeStartcmdShell(final Collection<File> jars) {
}
out.write(
"""
if test -n "$CLASSPATH"; then
export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
else
export CLASSPATH="$NEW_CLASSPATH"
fi
cd "$DITA_DIR"
"$SHELL"
"""
if test -n "$CLASSPATH"; then
export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
else
export CLASSPATH="$NEW_CLASSPATH"
fi
cd "$DITA_DIR"
"$SHELL"
"""
);
try {
Files.setPosixFilePermissions(outFile.toPath(), PERMISSIONS);
Expand All @@ -785,21 +785,21 @@ private void writeStartcmdBatch(final Collection<File> jars) {

out.write(
"""
@echo off\r
REM Generated file, do not edit manually\r
echo "NOTE: The startcmd.bat has been deprecated, use the dita.bat command instead."\r
pause\r
\r
REM Get the absolute path of DITAOT's home directory\r
set DITA_DIR=%~dp0\r
\r
REM Set environment variables\r
set ANT_OPTS=-Xmx512m %ANT_OPTS%\r
set ANT_OPTS=%ANT_OPTS% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl\r
set ANT_HOME=%DITA_DIR%\r
set PATH=%DITA_DIR%\\bin;%PATH%\r
set CLASSPATH=%DITA_DIR%lib;%CLASSPATH%\r
"""
@echo off\r
REM Generated file, do not edit manually\r
echo "NOTE: The startcmd.bat has been deprecated, use the dita.bat command instead."\r
pause\r
\r
REM Get the absolute path of DITAOT's home directory\r
set DITA_DIR=%~dp0\r
\r
REM Set environment variables\r
set ANT_OPTS=-Xmx512m %ANT_OPTS%\r
set ANT_OPTS=%ANT_OPTS% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl\r
set ANT_HOME=%DITA_DIR%\r
set PATH=%DITA_DIR%\\bin;%PATH%\r
set CLASSPATH=%DITA_DIR%lib;%CLASSPATH%\r
"""
);
for (final File relativeLib : jars) {
out.write("set CLASSPATH=");
Expand Down

0 comments on commit d7a81ea

Please sign in to comment.