Hi Greg
In my OP, I should clarified that I tend to make a build script for TCZ submissions rather than a compile script that makes the package but does not show the building dependencies or other stuff. In other words, I am not doing something just as root but for some other reason. I was deliberately being vague as I was not asking for help to build a package. Well not at this stage, I am sure I will need help
if you are using sudo, your script is run as a local user with root powers.
I open a terminal and get full root then run the script as root.
The differences I think are that in the creating extension wiki, someone (not me) wrote
Try to use sudo in scripts as least as possible
but you can find plenty of dev team members with compile scripts that run as local user.
sooner or later, they have to do some things with root powers such as the tce.installed script
and root ownership of some dir or files.
by running as root I achieve those things more easily but can not run tce-load or wget as root.
Hence the various tce-load options offered here.