diff --git a/update_psa_helpers b/update_psa_helpers old mode 100644 new mode 100755 index 60520d7..d9bde06 --- a/update_psa_helpers +++ b/update_psa_helpers @@ -6,25 +6,16 @@ # return 0 #fi +source ./general_utils + exec_opkg_command () { local func="${FUNCNAME[0]}" - log_debug "$func:${LINENO} exec-ing [$*]" - exec {fd}< <(eval "$@") - local ps_pid=$! # remember pid of process substitution + local __result=$(exec_process_substitution $*) + log_debug "$func:${LINENO} result=$__result" - local opkg_result="" - while read tmp <&$fd; do - if ! [ -z "$tmp" ]; then - opkg_result="${opkg_result}$tmp" - fi - done - - exec {fd}>&- # close fd (i.e. process substitution) - wait $ps_pid # wait for the subshell to finish - - printf '%s' "$opkg_result" + printf '%s' "$__result" } # Fetch/merge updates from predefined repository using git.