graysky2 / anything-sync-daemon

Symlinks and syncs user specified dirs to RAM thus reducing HDD/SDD calls and speeding-up the system.
https://wiki.archlinux.org/index.php/Anything-sync-daemon
MIT License
345 stars 45 forks source link

Autofix trailing slashes #43

Closed ThibaultLemaire closed 8 years ago

ThibaultLemaire commented 8 years ago

Added shell parameter expansion to remove every trailing slashes in the parameters loaded from asd.conf, fixing issue #42. This includes all entries of the WHATTOSYNC array, as well as the VOLATILE variable.

Updated asd.conf template and man page accordingly.

The shell parameter expansion uses an extended pattern matching which requires the shell option extglob to be set. I made sure this doesn't (and won't in the future) interfere with the rest of the script, but maybe it could be set for entirety of the script.

graysky2 commented 8 years ago

Thanks, will test and merge if good.

graysky2 commented 8 years ago

Seems solid, thank you for the contribution.