Archive for the 'Code Snippets' Category

A shell script to automate the workspace setup process

I usually hate doing repetitive tasks, but I know by now that this is a way of thinking that can easly lead to infinite recursion, as the definition of “repetitive task” can be very vague sometimes. Despite that, I do love wasting my time when there are pressing things to do!

This bash script attempts to setup a clean environment for your new project doing the following things:

  1. SVN repository setup in /var/svn/repos (by default)
  2. Trac environment setup /var/www/trac (by default)
  3. Setup of a password-protected virtual host in Apache linked to location /trac

It uses zenity to graphically interact with the user (so GNOME only, sorry!). Every step in the setup process, except for the SVN repository setup, can be skipped at runtime and default paths can be changed by editing the script source.

I’m releasing this script under the MIT license, before downloading keep in mind that I made this for my personal use and so I haven’t tested it with other configurations except for mine, so don’t blame me if it blows up your environment!
If it did not, I’m glad it spared you some work!

To run open your favourite terminal application and chmod +x the script file, than type:

./setwspace.sh

Download:
Set Workspace Script (1238)

A Screenshot from the script

The script in action




Partly powered by CleverPlugins.com