-for arch in $(echo "${detailed}" | "${sed}" -e '/^architecture / { s/^architecture //; p; }; d;'); do
- offset=$(echo "${detailed}" | "${sed}" -e '
- /^architecture / { x; s/.*/0/; x; };
- /^architecture '${arch}'$/ { x; s/.*/1/; x; };
- x; /^1$/ { x; /^ *offset / { s/^ *offset //; p; }; x; }; x;
- d;
- ')
+for arch in "${archs[@]}"; do
+ if [[ "${detailed+@}" ]]; then
+ offset=$(echo "${detailed}" | "${sed}" -e '
+ /^architecture / { x; s/.*/0/; x; };
+ /^architecture '${arch}'$/ { x; s/.*/1/; x; };
+ x; /^1$/ { x; /^ *offset / { s/^ *offset //; p; }; x; }; x;
+ d;
+ ')
+ else
+ offset=0
+ fi