Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

repush.sh - line 552: unexpected EOF while looking for matching `"' #14

Closed
DblA opened this issue May 29, 2019 · 4 comments
Closed

repush.sh - line 552: unexpected EOF while looking for matching `"' #14

DblA opened this issue May 29, 2019 · 4 comments
Assignees

Comments

@DblA
Copy link

DblA commented May 29, 2019

line 552: unexpected EOF while looking for matching `"'

I suspect the culprit s in creating the epub placeholder.

Commenting that out resulted in some grep help messages and error: "repush: File extension invalid or missing: pump_doc.pdf".

Using script version 3.0 on MacOS 10.14.5.

@CTXz CTXz self-assigned this May 30, 2019
@CTXz
Copy link
Member

CTXz commented May 30, 2019

Sight...

I could rant for hours about the fragmentation of Unix tools at this point... but plenty of other people have done that for me already.

This once again seems to be a compatibility issue between Mac and GNU tools.

Since I do not own a MacOS machine and It could take a little while until I get a MacOS VM set up, you'll have to lend me your hand here.

Would you mind telling me whether this script produces a epub placeholder in /tmp (on your PC, not the remarkable)? If it doesn't, please paste the error here.

Thanks

@DblA
Copy link
Author

DblA commented May 30, 2019

SIgh indeed.. It is a Mac /GNU compatability issue. The script returns same error with Mac. Using gnu bash from macports port install bash works around the problem, so I suppose this is a low priority issue.

@karenerobinson
Copy link

karenerobinson commented Jan 6, 2020

Fantastic script!

My workaround on macos was a bit different as I was hesitant to install a new bash onto my machine. However I will be able to use this for PDFs so am happy.

  • remove the placeholder EPUB function. I will only be able to transfer pdfs.
  • my grep does not have -P for perl. thus I also searched the file for -qP and commented-out
  elif [ -z $is_directory ] && ! echo "$1" | grep -qP "\.pdf$" && ! echo "$1" | grep -qP "\.epub$" ; then
    echo "repush: File extension invalid or missing: $1"
    return 0

possibly related: I can only send files that are .pdf, not .PDF.
if I send a .PDF file, a blank pdf is created in the root directory on reMarkable with the lower-case filename, and the script seems caught in an infinite loop.

@karenerobinson
Copy link

btw I run into this using webui_invincibility.sh as well

webui_invincibility.sh: line 111: unexpected EOF while looking for matching ``'
webui_invincibility.sh: line 295: syntax error: unexpected end of file

@CTXz CTXz closed this as completed in ac93463 Nov 10, 2020
CTXz added a commit that referenced this issue Nov 10, 2020
Portable way of using heredocs. Fixes #14 on macOS.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants