Unexpected end of file

I was asked to change the bash script in my internship, and since I first started reading the bash syntax yesterday, it's hard for me to identify a syntax error: unexpected end of file. "I was wondering if anyone could help me.

The last part of the script:

    echo "  " >>${MAILLOG}

    echo "Building CSAPI SDK" >>${MAILLOG}
        cd ${BuildsDIR}
        make sdk
    # Wait 3 minutes for the HDXs to reboot and SDK build to complete
    echo "Waiting for the HDXs to reboot and SDK build to complete..." >>${MAILLOG}
        sleep 180
    echo "Running PyUnit tests" >>${MAILLOG}
        cd Common/csapi/pyunit
        make test >>${TESTLOG} 2>&1

    TestReportLink=`mklink ${BUILDURL}/${1}/build/Common/csapi/pyunit/report.xml`
    TestLogLink=`mklink ${BUILDURL}/${1}/build/${1}.test.log`

    echo "Test report: ${TestReportLink}" >>${MAILLOG} 
    echo "Test log: ${TestLogLink}"  >>${MAILLOG} 
    # Wait 3 minutes for the tests to complete
        sleep 180
+3
source share
2 answers

About line 129 of this script, the following appears:

    EOFBUILDFAILUREMSG

remove the leading white space from this line and your error message will disappear.

This is the final delimiter of the document. If line 123 was changed so that the forwarding operator was <<-, you could go to the leading white space, and the space consisted only of tabs (without spaces):

    cat <<-EOFBUILDFAILUREMSG >>${MAILLOG}
+4

https://superuser.com/q/184861/48480, mklink() "/" "\". ${BUILDURL}/${1}/build/${1}.test.log - ausdatos01\\development\\mrahman\\projects\\builds\\autobuilder\\<source directory>\\build\\<source directory>.test.log. , NIX, . , , script Windows (, cygwin...).

, mklink

mklink () {
#    node="\\\\$1"
#    echo $node`echo $2|sed 's/\//\\\\/g'`
}
0

Source: https://habr.com/ru/post/1763536/


All Articles