mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-13 13:03:58 +00:00
Fix brace expansion (fixes #106)
This commit is contained in:
parent
09a018ea5a
commit
d45344dbe2
28
yadm
28
yadm
@ -927,17 +927,9 @@ function parse_encrypt() {
|
|||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
for pattern in $line; do
|
for pattern in $line; do
|
||||||
if [[ "$pattern" =~ $exclude_pattern ]]; then
|
if [[ "$pattern" =~ $exclude_pattern ]]; then
|
||||||
for ex_file in ${BASH_REMATCH[1]}; do
|
eval "parse_encrypt_exclude ${BASH_REMATCH[1]}"
|
||||||
if [ -e "$ex_file" ]; then
|
|
||||||
ENCRYPT_EXCLUDE_FILES+=("$ex_file")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
for in_file in $pattern; do
|
eval "parse_encrypt_include $pattern"
|
||||||
if [ -e "$in_file" ]; then
|
|
||||||
ENCRYPT_INCLUDE_FILES+=("$in_file")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -960,6 +952,22 @@ function parse_encrypt() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parse_encrypt_exclude() {
|
||||||
|
for ex_file in "$@"; do
|
||||||
|
if [ -e "$ex_file" ]; then
|
||||||
|
ENCRYPT_EXCLUDE_FILES+=("$ex_file")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function parse_encrypt_include() {
|
||||||
|
for in_file in "$@"; do
|
||||||
|
if [ -e "$in_file" ]; then
|
||||||
|
ENCRYPT_INCLUDE_FILES+=("$in_file")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
#; ****** Auto Functions ******
|
#; ****** Auto Functions ******
|
||||||
|
|
||||||
function auto_alt() {
|
function auto_alt() {
|
||||||
|
Loading…
Reference in New Issue
Block a user