${var:-default} means $var if $var is defined and otherwise "default"
${var:+value} means if $var is defined use "value"; otherwise nothing if $var is defined use "value"; otherwise nothing
The second may seem a little strange, but your code snippet shows a typical use:
${debian_chroot:+($debian_chroot)}
This means that "if $ debian_chroot is specified, then insert it in parentheses."
Above, “defined” means “set to some non-zero value”. Unix shells usually do not distinguish between uninstalled variables and variables set to an empty string, but bash may be told to raise the error condition if an undefined variable is used. (You do this with set -u .) In this case, if debian_chroot has never been installed, $debian_chroot will result in an error, and ${debian_chroot:-} will use $debian_chroot if it was installed, otherwise - empty string.
source share