add systemwide install support

This commit is contained in:
utahta
2011-08-07 03:48:38 +09:00
parent 7b2fa2f0eb
commit 4993f466e9
6 changed files with 126 additions and 38 deletions
+15 -3
View File
@@ -11,8 +11,8 @@ if [ -z "${PATH_HOME}" ] ; then
fi
PATH_HOME_ETC="$PATH_HOME/etc"
# exec
pythonbrew="$PATH_ROOT/bin/pythonbrew"
# py file
PY_PYTHONBREW="$PATH_ROOT/bin/pythonbrew"
# functions
__pythonbrew_set_default()
@@ -103,7 +103,7 @@ __pythonbrew_find_command()
done
}
pythonbrew()
__pythonbrew_run()
{
__pythonbrew_find_command "$@"
case $command_name in
@@ -117,10 +117,22 @@ pythonbrew()
builtin hash -r
}
pythonbrew()
{
pythonbrew=$PY_PYTHONBREW
__pythonbrew_run "$@"
}
pybrew()
{
pythonbrew "$@"
}
sudopybrew()
{
pythonbrew="sudo PYTHONBREW_ROOT=$PATH_ROOT $PY_PYTHONBREW"
__pythonbrew_run "$@"
}
# main
__pythonbrew_set_current_path