-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
syntax error: unexpected newline #37
Comments
it looks like script is broken. I checked and instead of getting the getlatest.sh, it grabs a redirect message, resulting it breaking install.sh
|
What's the fix for this? |
Not sure, I'm not much of a coder X(.. |
Open |
In my attempts, this alone does not correct the issue. It will allow includes/getlatest.sh to be retrieved, but then that file also manually has the url specified ( see line 19: YAMon-v4/includes/getlatest.sh Line 19 in f437a3d
Dvineone's update should make it work: #38 |
only had chance yesterday to test this and got the same error! I’m glad you found a fix and hopefully it will get merged! |
I did find a fix for this issue. As mentioned about the html links reference HTTP:// rather than HTTPS://. You can change the link in the install.sh script to https and then run it. That will download the getatest,sh script to the /opt/YAMon4/includes directory. The problem lies in that when the install.sh is run it downloads a new getlatest.sh script, so if you fix the http problem in the getlatest.sh script it will be overwritten when you run install.sh again. The solution is to run the install.sh script which will give you the newline error. Then edit the getlatest.sh script changing the http lines to https. Then you comment out the lines in the install.sh script that download the getlatest.sh script, and run the install.sh script again. The install.sh script will run but not download the getlatest.sh script, which is already in the directory and the http entries have been fixed. At that point the install.sh script runs normally and performs the install. Comment out these 2 lines in the install.sh script: should be lines 144 and 145 Save the file and run the install.sh and it should install with no problem. |
This does not fix the issue for me. The getlatest.sh just contains some HTML, and if I download that file directly and proceed after commenting out the suggested lines in install.sh, an error appears with version.sh, which also just contains HTML. Has anyone solved this? I can't get it to work!
|
The install process is basically broken with missing links everywhere. |
uninstall curl and using wget to download fix it for me on openwrt |
Seems this is still broken. Guess sticking with v3 yet again. |
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 able to get it working by adding |
That worked for me. I just added |
Sorry if this is a dumb question but how do i get rid of this error?
/opt/install.sh: /opt/YAMon4/includes/getlatest.sh: line 2: syntax error: unexpected newline
The text was updated successfully, but these errors were encountered: