Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.

Fixed 'make install' generating wrong dropbox wrapper script#3

Merged
dimaryaz merged 2 commits intodimaryaz:masterfrom
Uplink03:master
Nov 23, 2018
Merged

Fixed 'make install' generating wrong dropbox wrapper script#3
dimaryaz merged 2 commits intodimaryaz:masterfrom
Uplink03:master

Conversation

@Uplink03
Copy link
Copy Markdown
Contributor

I'm on Ubuntu 18.04 and echo -e outputs -e when run with '/bin/sh' (the default shell for make), rather than interpret it a "process C escape sequences" (like Bash does).

make install created the dropbox wrapper script with the wrong first line: -e #!/bin/bash

This patch replaced the echo in the Makefile with a copy of an external file. The new dropbox file uses dirname to be path-agnostic.

I haven't changed the python script, because it works, and it doesn't have the problem fixed by this patch, but it might be worth looking if it could be improved to copy my new dropbox script instead of generating it in place.

`make install` created the dropbox wrapper script with the wrong first
line: -e #!/bin/bash

This patch replaced the echo in the Makefile with a copy of an external
file. The new dropbox file uses `dirname` to be path-agnostic.
Copy link
Copy Markdown
Owner

@dimaryaz dimaryaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool, didn't think of that.

So I'm curious, does the hack actually work for you? I've gotten multiple reports that it stopped working - but I haven't seen any problems myself.

Comment thread Makefile Outdated
install: libdropbox_ext4.so
install $^ $(INSTALL_DIR)/lib/ && \
echo -e "#!/bin/bash\n\nLD_PRELOAD=$(INSTALL_DIR)/lib/$^ exec /usr/bin/dropbox \"\$$@\"" > $(INSTALL_DIR)/bin/dropbox && \
cp dropbox $(INSTALL_DIR)/bin/dropbox && \
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change it from cp to install? That's technically the right way - and it'll keep permissions, so you can then delete the chmod below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used install before, but it makes sense. I've made the change.

@Uplink03
Copy link
Copy Markdown
Contributor Author

As far as I can tell, this hack works for now. Dropbox stopped bothering me with notifications, and it appears to be synchronising.

I've seen another project mentioned in one of the issues opened on your project, and I'm keeping it in mind for when Dropbox decides to complain again, but until then your project seems OK.

For reference, my Dropbox says it's version v61.4.95. I'm using btrfs on LUKS as my filesystem on all my machines, and I'd rather fight with Dropbox than switch to ext4 😄

@dimaryaz dimaryaz merged commit 7cb9365 into dimaryaz:master Nov 23, 2018
@dimaryaz
Copy link
Copy Markdown
Owner

Sounds good then. Merged!

@Uplink03
Copy link
Copy Markdown
Contributor Author

Well, that didn't last long. my Dropbox is now v63.4.100 and now it gives me a popup telling me it won't run until I move it to a supported location.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants