-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carriage returns in .sh files when unzipped on Windows machines #35
Comments
Not just Windows. I thought that too so I redid it all on Ubuntu Linux. The files in the manual install are ALL windows format. I installed tofrolinux and ran them all through fromdos. |
I ran into the same issues, and copied the manual install files. I can't get the setup4.0.7.sh to work either on OpenWRT. It returns a bunch of errors. Any tips? |
Wasn't working so I had another crack at it a few days ago.
|
Whenever you extract a zip archive containing UNIX formatted text files onto a Windows system, Windows inserts carriage returns into them, effectively corrupting the scripts. I was able to fix this problem using the dos2unix utility which is available on sourceforge (https://sourceforge.net/projects/dos2unix/). I downloaded and extracted the zip archive on my laptop -- I had to use this method because wget wasn't working for me. You run this on Windows (it also supports MAC) and you want to run it to recursively convert all text files. Then I used winscp to copy the entire file structure to the USB drive while it was connected to my router. Afterwards, I was able to run the setup program. |
I was unable to get the install to work on my DD-WRT router. Trying to execute the setup script just rendered "not found". Eventually, I figured out (by looking at the file through vi) that there were extraneous carriage returns ("^M") at the end of every line. I removed these using sed -i 's/\r//g' *.sh and everything worked fine after this. I assume the carriage returns had been generated when I unzipped the file on my Windows machine, before using PSCP to transfer it to the router.
Unless my setup somehow is weird, perhaps it would be worth including something about this in the installation instructions?
The text was updated successfully, but these errors were encountered: