diff --git a/module/UpdateTargetList.sh b/module/UpdateTargetList.sh index 981eefe..88183f5 100644 --- a/module/UpdateTargetList.sh +++ b/module/UpdateTargetList.sh @@ -25,7 +25,7 @@ else fi # Read exclution and addition config -EXCLUDE=$(grep -vE '^#|^$' "$MODDIR/EXCLUDE" | tr '\n' '|' | sed 's/|$//') +EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//') ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION") # Create or overwrite the target.txt file diff --git a/module/customize.sh b/module/customize.sh index f19379b..86d40e7 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -24,8 +24,8 @@ TS="/data/adb/tricky_store" CONFIG_DIR="$TS/target_list_config" MODNAME=$(grep '^id=' "$MODPATH/module.prop" | awk -F= '{print $2}' | xargs) ORG_DIR="/data/adb/modules/$MODNAME" -EXCLUDE=$(grep -vE '^#|^$' "$CONFIG_DIR/EXCLUDE") -ADDITION=$(grep -vE '^#|^$' "$CONFIG_DIR/ADDITION") +EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE") +ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION") if [ -d "$TS" ]; then echo "- Tricky store module installed"