OCB7D2D / OcbElectricityOverhaul

OCB Electricity Overhaul - 7 Days to Die (V1.0) Addon
https://www.nexusmods.com/7daystodie/mods/1713
15 stars 3 forks source link

Linux startmodserver.sh not running #10

Closed Shadow-Genesis closed 2 years ago

Shadow-Genesis commented 2 years ago

When trying to run the startmodserver.sh I get the error "/bin/sh^M: bad interpreter: No such file or directory" I did a quick google search and found "sed -i -e 's/\r$//' startmodserver.sh" fixes the file to run.

Link: https://askubuntu.com/questions/304999/not-able-to-execute-a-sh-file-bin-bashm-bad-interpreter

mgreter commented 2 years ago

That "^M" (carriage return) normally indicates windows linefeeds, which unix/linux will choke on. Unfortunately I can't see any issue with the existing script in that regard, but I've added a line to the `.gitattributes" file, so it should now enforce unix linefeeds on those files (even when checked-out/cloned on windows). Since the committed file seems to have the correct linefeed format, I can only assume that you cloned the repo on windows and them transferred it to a unix/linux machine?

Normally you'd want to install "dos2unix" utility (which is available on pretty much every linux distro) to convert the linefeeds to proper unix format from windows. Closing this bug report as it doesn't seem to be an issue with the repo itself. Feel free to add more info if you think it is a problem with what is committed to this repo though, and I'll gladly re-open it and fix it!