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

pull/57/head
Tim Byrne 7 years ago
parent ef796bc2c1
commit eba6557ae8
No known key found for this signature in database
GPG Key ID: 6CBE24C2FD8CF76E

@ -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"

Loading…
Cancel
Save