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. |
| 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.
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.
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
fiI've actually adjusted that in my local version of the script which I started with |
|
See #389 for my version |
Check #383