Commits

Doug Hellmann committed 3590d7c

change function declaration syntax so typeset works under ksh

Comments (0)

Files changed (2)

virtualenvwrapper/ChangeLog

 2011-09-04  Doug Hellmann  <dhellmann@racemi.com>
 
-	* project.sh (mkproject): Move argument parsing into the shell
-	function.
+	* project.sh: Change function declaration syntax so that typeset
+	works under ksh.
+	(mkproject): Move argument parsing into the shell function.
 
 	* project.py: Remove argument parsing functions.
 

virtualenvwrapper/project.sh

 #
 
 # Verify that the PROJECT_HOME directory exists
-virtualenvwrapper_verify_project_home () {
+function virtualenvwrapper_verify_project_home {
     if [ -z "$PROJECT_HOME" ]
     then
         echo "ERROR: Set the PROJECT_HOME shell variable to the name of the directory where projects should be created." >&2
 # Given a virtualenv directory and a project directory,
 # set the virtualenv up to be associated with the 
 # project
-setvirtualenvproject () {
+function setvirtualenvproject {
     typeset venv="$1"
     typeset prj="$2"
     if [ -z "$venv" ]
 }
 
 # Show help for mkproject
-mkproject_help () {
+function mkproject_help {
     echo "Usage: mkproject [-t template] [virtualenv options] project_name"
     echo ""
     echo "Multiple templates may be selected.  They are applied in the order"
 }
 
 # Change directory to the active project
-cdproject () {
+function cdproject {
     virtualenvwrapper_verify_workon_home || return 1
     virtualenvwrapper_verify_active_environment || return 1
     if [ -f "$VIRTUAL_ENV/.project" ]
         return 1
     fi
     return 0
-}
+}