From 5bb192a8698320364cde2220590f4c815c20fbb2 Mon Sep 17 00:00:00 2001 From: Ross Smith II Date: Wed, 7 Mar 2018 15:29:21 -0800 Subject: [PATCH] Have `yadm encrypt` match dotfiles (like .gitignore does) --- yadm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yadm b/yadm index e55a287..c018aa9 100755 --- a/yadm +++ b/yadm @@ -921,6 +921,9 @@ function parse_encrypt() { exclude_pattern="^!(.+)" if [ -f "$YADM_ENCRYPT" ] ; then + shopt_dotglob="$(shopt -p dotglob)" + shopt -s dotglob + #; parse both included/excluded while IFS='' read -r line || [ -n "$line" ]; do if [[ ! $line =~ ^# && ! $line =~ ^[[:space:]]*$ ]] ; then @@ -943,6 +946,8 @@ function parse_encrypt() { fi done < "$YADM_ENCRYPT" + eval "$shopt_dotglob" + #; remove excludes from the includes #(SC2068 is disabled because in this case, we desire globbing) FINAL_INCLUDE=()