That's pretty straight forward shell script:
the
[ -f ... ]
expression is a
test, in this case
-f
tests for file existence (see
man test)
if the test succeeds, then we get root privileges via
sudo
and move the new executable into position
This line
sn=$(grep -Po '^Serial\s*:\s*\K[[:xdigit:]]{16}' /proc/cpuinfo)
runs grep's the /proc/cpuinfo file in a sub shell (that's what $() does, also written with back-ticks ``) for the serial number and assigns the value to variable
sn
we then run a java program, again as root
and finally, we run chromium in kiosk mode, starting an incognito page at starting from the web site given.