Change frappe bench install location from automated script

Could anyone kindly point me in the right direction on how to change the install directory on the script? When we run an install it usually installs in the root directory. Or is there a reason why not to install in the root directory?

it will install in the home directory of the user running the script, or (recommended) a newly created “frappe” user. Unless you’re really comfortable with things (if you were, you most likely would not be asking this question), it’s recommended not to change anything.