-
Notifications
You must be signed in to change notification settings - Fork 140
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
grive-sync: Remove "$HOME" subdirectory requirement #385
base: master
Are you sure you want to change the base?
Conversation
Hi. Just remove it, don't comment it out |
Hello, ah, ok. Done. If you are interested in clean code, I can try to force push another clean commit but I'm not sure how the PR is going to handle it. |
@@ -17,11 +17,6 @@ cd ~ | |||
SCRIPT="${0}" | |||
DIRECTORY=$(systemd-escape --unescape -- "$2") | |||
|
|||
if [[ -z "$DIRECTORY" ]] || [[ ! -d "$DIRECTORY" ]] ; then | |||
echo "Need a directory name in the current users home directory as second argument. Aborting." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is alright (assuming -z tests for "not defined"), but the msg should be "need a directory as either absolute path or relative to $HOME"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right. I took a better look and what exactly was happening and it was all about a "/"....
ed54894
to
a9775e5
Compare
Right now I feel that the original test is better suited: if I would configure the script to sync if [[ -z "${DIRECTORY}" ]] || [[ ! -d "${DIRECTORY}" ]] ; then
echo "Need a directory name (absolute or relative to the current users home directory) as second argument. Got ${DIRECTORY}. Aborting."
exit 1
fi I've actually adjusted that in my local version of the script which I started with |
See #389 for my version |
Check #383