Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Shell
Cannot retrieve the latest commit at this time.
| Failed to load latest commit information. | |||
|
|
README | ||
|
|
process_functions.sh | ||
|
|
workit.sh | ||
README
Workit is a blatant rip off of Doug Hellmann's virtualenv wrapper: http://www.doughellmann.com/projects/virtualenvwrapper/ I just wanted something that wasn't wrapped out virtualenv since most of my projects are PHP or other type things. The nice thing is that it allows you to setup a postactivate command which can setup your environment for you. Below is a sample postactivate script which performs several actions upon getting into the project. > $ workit someproject > > #! /bin/zsh > > # variables needed for some script > export JS_PATH="$PROJ_PATH/src"; > > # define a custom function we can use to launch tests > qunit() { chrome "http://project/javascript/tests/runtests.html" } > > # run ctags so vim is up to date when we start working on a project > ctags -f $PROJ_PATH/tags -R $PROJ_PATH/src 2> /dev/null &! > > # use the reusable methods for start/stop serives. This project shuts down mysql > # and starts up pgsql for use > zmysql_stop > zpgsql_start You can also run a postdeactivate to shut down or clear settings from the project. This is run whenver the command `deactivate` is run or you switch to another project. Projects are directories within the directories specified in the WORKIT_HOME. You can create an array of locations to used. Any directory in these paths will be used to complete/switch projects.