|
|
@ -1824,6 +1824,11 @@ function parse_encrypt() {
|
|
|
|
|
|
|
|
|
|
|
|
ENCRYPT_INCLUDE_FILES=()
|
|
|
|
ENCRYPT_INCLUDE_FILES=()
|
|
|
|
ENCRYPT_EXCLUDE_FILES=()
|
|
|
|
ENCRYPT_EXCLUDE_FILES=()
|
|
|
|
|
|
|
|
FINAL_INCLUDE=()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f "$YADM_ENCRYPT" ] ; then
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
cd_work "Parsing encrypt" || return
|
|
|
|
cd_work "Parsing encrypt" || return
|
|
|
|
|
|
|
|
|
|
|
@ -1836,7 +1841,6 @@ function parse_encrypt() {
|
|
|
|
shopt -s globstar &> /dev/null
|
|
|
|
shopt -s globstar &> /dev/null
|
|
|
|
|
|
|
|
|
|
|
|
exclude_pattern="^!(.+)"
|
|
|
|
exclude_pattern="^!(.+)"
|
|
|
|
if [ -f "$YADM_ENCRYPT" ] ; then
|
|
|
|
|
|
|
|
# parse both included/excluded
|
|
|
|
# parse both included/excluded
|
|
|
|
while IFS='' read -r line || [ -n "$line" ]; do
|
|
|
|
while IFS='' read -r line || [ -n "$line" ]; do
|
|
|
|
if [[ ! $line =~ ^# && ! $line =~ ^[[:blank:]]*$ ]] ; then
|
|
|
|
if [[ ! $line =~ ^# && ! $line =~ ^[[:blank:]]*$ ]] ; then
|
|
|
@ -1861,7 +1865,6 @@ function parse_encrypt() {
|
|
|
|
|
|
|
|
|
|
|
|
# remove excludes from the includes
|
|
|
|
# remove excludes from the includes
|
|
|
|
#(SC2068 is disabled because in this case, we desire globbing)
|
|
|
|
#(SC2068 is disabled because in this case, we desire globbing)
|
|
|
|
FINAL_INCLUDE=()
|
|
|
|
|
|
|
|
#shellcheck disable=SC2068
|
|
|
|
#shellcheck disable=SC2068
|
|
|
|
for included in "${ENCRYPT_INCLUDE_FILES[@]}"; do
|
|
|
|
for included in "${ENCRYPT_INCLUDE_FILES[@]}"; do
|
|
|
|
skip=
|
|
|
|
skip=
|
|
|
@ -1876,7 +1879,6 @@ function parse_encrypt() {
|
|
|
|
#shellcheck disable=SC2207
|
|
|
|
#shellcheck disable=SC2207
|
|
|
|
IFS=$'\n' ENCRYPT_INCLUDE_FILES=($(LC_ALL=C sort <<<"${FINAL_INCLUDE[*]}"))
|
|
|
|
IFS=$'\n' ENCRYPT_INCLUDE_FILES=($(LC_ALL=C sort <<<"${FINAL_INCLUDE[*]}"))
|
|
|
|
unset IFS
|
|
|
|
unset IFS
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$unset_globstar" = "1" ]; then
|
|
|
|
if [ "$unset_globstar" = "1" ]; then
|
|
|
|
shopt -u globstar &> /dev/null
|
|
|
|
shopt -u globstar &> /dev/null
|
|
|
|