The problem is that quotes are not processed after variable substitution. So it looks like you're trying to define a macro named '_transaction_color
.
Try using an array:
INSTALL_OPT=(-Uvh --define '_transaction_color 3')
then:
"$INSTALL_CMD" "${INSTALL_OPT[@]}" myPackage.rpm
It's important to put ${INSTALL_OPT[@]}
inside double quotes to get the requoting.