michealespinola / syno.plexupdate

A script to automagically update Plex Media Server on Synology NAS
GNU General Public License v3.0
273 stars 23 forks source link

Script fails to run - Current status: 2 (Interrupted) $'\r': command not found #19

Closed vpvnguyen closed 3 years ago

vpvnguyen commented 3 years ago

Expected Behavior

syno.plexupdate.sh runs properly on Synology DSM 6.2.4

Current Behavior

syno.plexupdate.sh fails to run due to CRLF EOL sequence

Current status: 2 (Interrupted)
Standard output/error:
syno.plexupdate.sh: line 2: $'\r': command not found
syno.plexupdate.sh: line 12: $'\r': command not found

SYNO.PLEX UPDATE SCRIPT v3.0.2

syno.plexupdate.sh: line 20: $'\r': command not found
syno.plexupdate.sh: line 192: syntax error near unexpected token `elif'
syno.plexupdate.sh: line 192: `  elif [ "$PlexChannl" -eq "8" ]; then'

Steps to Reproduce

Run syno.plexupdate.sh in Task Scheduler on DSM 6.2.4

Possible Solution

Replace CRLF with LF. Enforce git to set .sh files to use LF. PR: https://github.com/michealespinola/syno.plexupdate/pull/18

michealespinola commented 3 years ago

Did you save the file incorrectly?

vpvnguyen commented 3 years ago

@michealespinola

Hey! Sorry! This is my mistake. After more investigation, it was due to my own editor that set CRLF on the file. When cloning down on my windows machine, it set the file to CRLF. I checked on my linux and mac machines and was able to pull this fine. Sorry for the trouble!