Unable to install prereqs

I am using the below link to install msbuild on Ubuntu 20.04 LTS in my environment.

I tried with both root and non-root users, but no luck. There are a few other tools also which are not getting installed from the below link. For example, brew.

Also, there are git.sh and haskell.sh scripts which I am calling from my Shell script. I also have an environment variable DEBIAN_FRONTEND declared in my Shell script. But I am not sure how to pass it to the scripts being called from my Shell script. The git and haskell scripts prompt and wait till an input is provided. I am not sure how to address these issues.

Has anyone else faced issues with the installation? Please help.