Install script Ubuntu

On Nextcloud/Spreed.me install script Debian I found a script which installs Nextcloud on a Debian server. Because I am using Ubuntu I tried to write my own script, based on the Debian script (thanks to SyS0p3r) and my own list of commands.

I am a novice script writer and do not have much experience… The script is far from complete and is not working right.

My trials are downloadable here.

Who can help me to finetune and correct the script?

Regards
Guido