• Getting the last [x] number of labels from clearcase

    I kept wanting to do this several times in the past and never got around to doing it. Yesterday I really needed to have this functionality for a autodeploy tool I am creating. I am using PHP and want to get the last 10 labels from clearcase.

    Below is how I accomplished it.
    cleartool lstype -kind lbtype -invob vob:/vobtag -fmt ‘%Nd\t%n\n’ | sort |tail -10 | awk ‘{print $2}’

    Where:
    vobtag is the vob you want to get the labels against.

    By making cleartool format the output with the date in a sortable format and separate the values with a tab you can use awk to grab the last value (the label) and output.

    Keep in mind that this solution is for Unix/Linux enironment.

  • Fixing bad interpreter error when running Ant from Cygwin

    Do you get this error sometimes when trying to run your builds from cygwin? ant:^M /bin/sh: bad interpreter: No such file or directory I was plagued by this error from client to client and it would not always manifest itself on everyones machine. Well I finally traced it down and fixed it. The problem is two fold. The first part if you see ^M in the error then you have to fix two things.

    1. If you have the ^M in the error message. Open up $ANT_HOME/bin/ant and $ANT_HOME/bin/antRun and convert the file type to unix. I do this in vim. You can do this when you have the file open and type: :set fileformat=unix then save the file. Repeat for antRun too.
    2. The second part of the error or first if you did not have the other error. Basically when you downloaded and installed cygwin one of the base packages was missed. Run the setup.exe for cygwin and look for the Ash package.

    That is it. Any comments are welcomed.

  • Halo 3 Beta Test

    I never thought I would get selected, but as you can see below I get to participate in the Halo 3 Beta Test. I am looking forward to testing the game. My son is also very excited.

    Invite