1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2025-06-13 13:03:58 +00:00

Have yadm encrypt match dotfiles (like .gitignore does)

This commit is contained in:
Ross Smith II 2018-03-07 15:29:21 -08:00
parent 09a018ea5a
commit 5bb192a869

5
yadm
View File

@ -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=()