Ignore empty lines/whitespace lines in .yadm/encrypt (#40)

This commit is contained in:
Tim Byrne 2017-01-08 11:11:01 -06:00
parent ef796bc2c1
commit eba6557ae8
No known key found for this signature in database
GPG Key ID: 6CBE24C2FD8CF76E
1 changed files with 1 additions and 1 deletions

2
yadm
View File

@ -256,7 +256,7 @@ function encrypt() {
#; build a list of globs from YADM_ENCRYPT
GLOBS=()
while IFS='' read -r glob || [ -n "$glob" ]; do
if [[ ! $glob =~ ^# ]] ; then
if [[ ! $glob =~ ^# && ! $glob =~ ^[[:space:]]*$ ]] ; then
GLOBS=("${GLOBS[@]}" $(eval "$LS_PROGRAM" "$glob" 2>/dev/null))
fi
done < "$YADM_ENCRYPT"