Adding bash scripts to dock in Gnome

I was referring to super+a in Gnome Shell to show all applications, and then right clicking and pin to dash.

I can pin that to the dash and it uses the correct icon, however when it is run it switches to the terminal icon.