Set Bash Variable as Icon in osascript -e Display Dialog with icon
What always will work is encoding the icon file with base64 -b 64 (to keep the lines short enough), include it into your shell script as a here document and decode it on the fly.

To create a base64 encoded version of your icon file, run

base64 -b 64 -i path/to/icon/Myicon.icns &gt; myicon.base64


(This you only need to do once).

Then open your shell script in your editor and insert myicon.base64 (which might be rather big) in the correct spot 

...
ICNSPATH=${TMPDIR:-/tmp}/icon.$$.icns
base64 -D -o $ICNSPATH &lt;&lt;"END_OF_ICON"
** replace with content of myicon.base64 **
END_OF_ICON

osascript -e '... with icon '$ICNSPATH' as alias' # write full command here
rm -f $ICNSPATH


The final script will then look like the following 

...
ICNSPATH=${TMPDIR:-/tmp}/icon.$$.icns
base64 -D -o $ICNSPATH &lt;&lt;"END_OF_ICON"
aG93IHRvIGNvZGUgaXQgc28gaXQncyBjb21wbGV0ZWx5IHBvcnRhYmxlIHNvIGFz
...
eSBwdXQgaXQgaW4gaGlzIGZpbGUgc3lzdGVtLgoK
END_OF_ICON

osascript -e '... with icon '$ICNSPATH' as alias'
rm -f $ICNSPATH