Skip to content

Commit

Permalink
Fix line ending conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mjoppich committed May 16, 2019
1 parent 720a61b commit 6dbb624
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions templates/WSL_install.gui
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,29 @@ end
</script>
</if>
</add>

<const>
</const>
<const id="d2ucheck">
<![CDATA[
if [ "$(uname)" != "Darwin" ]; then
echo "Converting install module to UNIX file endings in $(pwd).";
printf "echo 'converting' && sed -i 's/\r//' \\\$1 && echo 'converted' " > ./tounix
else
echo "On Mac OS: no need to transform line-endings"
fi
]]>
</const>

<execute location="" exec="sh" param="-c '${d2ucheck}'" wsl="WSLsel">
<output type="STD" id="stdout" color="red" to="outputstream1" />
<output id="outcout2" type="CERR" color="red" to="outputstream2" />
</execute>

<execute location="" exec="dos2unix" param="${prog_wsl}" wsl="WSLsel">
<output type="STD" id="stdout" color="red" to="outputstream1" />
<execute location="" exec="sh" param="./tounix ${prog_wsl}" wsl="WSLsel">
<output type="STD" id="stdout" color="red" to="outputstream1" />
<output id="outcout2" type="CERR" color="red" to="outputstream2" />
</execute>

<execute location="" exec="sh" wsl="WSLsel" param="${cl}">
Expand Down

0 comments on commit 6dbb624

Please sign in to comment.