Skip to content

Commit

Permalink
fix: Recode line endings when installing
Browse files Browse the repository at this point in the history
Close #168 for good, I hope.
  • Loading branch information
lonemadmax committed Jul 27, 2018
1 parent 2c84ea9 commit b32cc5e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions scripts/install/install.sh
Expand Up @@ -180,11 +180,10 @@ if [ ! -f "${basedir}"/scripts/configuration.sh ]; then
echo >&2 "edit its content to suit your needs."
exit 4
fi
else
# Remove \r, just in case the file comes from a Windows editor that doesn't
# respect line endings. See issue #168
sed -i 's/\r$//' "${basedir}"/scripts/configuration.sh
fi
# Remove \r, just in case the file comes from a Windows editor that doesn't
# respect line endings, or from a transformed .dist. See issue #168
sed -i 's/\r$//' "${basedir}"/scripts/configuration.sh

if [ ! -f "${basedir}"/freeciv-web/src/main/webapp/WEB-INF/config.properties ]; then
if [ "${FCW_INSTALL_MODE}" = TEST ]; then
Expand All @@ -196,11 +195,10 @@ if [ ! -f "${basedir}"/freeciv-web/src/main/webapp/WEB-INF/config.properties ];
echo >&2 "suit your needs."
exit 4
fi
else
# Remove \r, just in case the file comes from a Windows editor that doesn't
# respect line endings. See issue #168
sed -i 's/\r$//' "${basedir}"/freeciv-web/src/main/webapp/WEB-INF/config.properties
fi
# Remove \r, just in case the file comes from a Windows editor that doesn't
# respect line endings, or from a transformed .dist. See issue #168
sed -i 's/\r$//' "${basedir}"/freeciv-web/src/main/webapp/WEB-INF/config.properties

FCW_INSTALL_SCRIPT=
while IFS=$'\t\r' read -r v r s; do
Expand Down

0 comments on commit b32cc5e

Please sign in to comment.