I have the below script, it is meant to be run with sudo however the first to commands (The git commands) need to run as the user "ubuntu"
sudo -u ubuntu "git -C linux/build-repo pull" sudo -u ubuntu "git -C android/build-repo pull" uoa_image=$(sh linux/build-repo/make.sh | sed -n '1 p') echo $uoa_image
However when this is run with sudo, the first two commands fail and the make.sh script when runs complains it doesn't have root
First lines give the errors:
sudo: git -C linux/build-repo pull: command not found sudo: git -C android/build-repo pull: command not found