22/08/2011 Leave a comment
The overlay scrollbar in Ubuntu 11.04 that is not always visible and not very usable either really bugs me. Here is how to get rid of it, the hard way:
$ sudo apt-get remove overlay-scrollbar liboverlay-scrollbar-0.1-0
Drifting in the ocean
12/08/2011 Leave a comment
When I posted Bash-Fu: Replacing text in multiple files in one line, I knew that there would be a simpler way to achieve that. Thanks to my former colleague Ben, here is an even simpler way that uses a perl command.
$ perl -p -i -e 's/0.6-SNAPSHOT/0.7-SNAPSHOT/g' `find ./ -name pom.xml`
This command replaces the occurences of 0.6-SNAPSHOT with 0.7-SNAPSHOT in all the pom.xml files in the current directory and sub-directories. It is the usage of the find command that provides the list of files to process to the perl command.
Pay attention to the ` that surround the find command. These are not quotes but accents.
08/08/2011 1 Comment
To tell Subversion to ignore files and directories, it is necessary to set the value of the svn:ignore property. To do so, open a terminal.
Run the following command in the terminal. It will open a Nano window in the terminal to allow editing the files and folders to ignore.
svn propedit svn:ignore .
In my case, I wanted to ignore Maven and Eclipse files. I therefore added the following directories:
To make the changes effective, you must commit your changes:
08/08/2011 2 Comments
We use Maven on our project for the build. The hitch is that when we want to change version numbers after each iteration, we need to do it by hand. I think I’m missing something with regard to Maven functionality or plug-ins but that’s for another post.
I wanted to replace the version for the iteration in all modules in one single command line. Here it is:
find . -name "pom.xml" -print0 | xargs -0 grep -lr -e '0.5-SNAPSHOT' | xargs sed -i 's/0.5-SNAPSHOT/0.6-SNAPSHOT/g'
The chain of commands is comprised of three parts:
I’m sure there a better ways to do it with both Bash and Maven. Nevertheless, this is pretty handy.