diff options
author | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-03-28 11:36:28 +0100 |
---|---|---|
committer | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-03-28 11:36:28 +0100 |
commit | 7f876d1c8635afca738be7c6710b9caf6aa52d4c (patch) | |
tree | b0f765c9b9aff4c594daeaeaa39cf73d5b28fbe8 | |
parent | 542dd5112688a7f7db890eb341d48e88b5735d39 (diff) |
Add user for reinstall commands.
-rwxr-xr-x | scripts/rhodecode-setup | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index 2f6add8..9f05526 100755 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -506,15 +506,21 @@ def install_rhodecode(work_dir, user=None): cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir) -def reinstall_rhodecode(work_dir): +def reinstall_rhodecode(work_dir, user=None): """Re-installs RhodeCode on the system. :param work_dir: The directory containing RhodeCode setup file. :type str """ cmd_args = ["python", "setup.py", "clean"] + if user: + cmd_args = ["-u", user, "-H"] + cmd_args + cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir, with_sudo=True) cmd_args = ["python", "setup.py", "install"] + if user: + cmd_args = ["-u", user, "-H"] + cmd_args + cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir, with_sudo=True) @@ -776,7 +782,7 @@ if __name__ == '__main__': # Update the rhodecode code base. Reinstall Rhodecode. update_rhodecode(args.rhodecode_branch, work_dir) - reinstall_rhodecode(work_dir) + reinstall_rhodecode(work_dir, args.rhodecode_usr) # Update database schema. update_database_schema(work_dir, rhodecode_conf, True) |