I want to create a script to install post Ubuntu install stuff like codecs and software.

The only problem is, when a script comes to a command it can't execute it just stops and falls into hyperspace.

I want my script to do something like this.

sudo apt-get install kde-wallpapers

If kde-wallpapers install succeeds, echo 'kde-wallpapers installed'

If kde-wallpapers does not install,
-----echo 'kde-wallpapers did not install'
-----Continue on to the next item.

What is the code to write this?

Even though everyone necessarily wants to do it, it seems to be far too obscure for the bash manuals. The only thing I've found would tell the computer to completely ignore the fact that kde-wallpapers did not install - and logically, it also would not tell me it didn't install. People point that out on forum posts on this subject, and then noone ever replies with the rest of the answer. I also get the distinct idea that the answer looks far more like assembly or machine language than bash.