Recent Events for foo.be MainPageDiary (Blog) Previous Next

2008-08-16 Operating Systems Always Need Git and GNU Screen

Following a micro-discussion with Michael about the software that you always need on your favorite operating system, we came to a similar conclusion : Git and GNU Screen are the must. Without them, your favorite free operating system looks useless. Of course, if you want to be ahead and always have the latest version of Git and GNU Screen in your ~/bin, there is a an easy way : Git 1 ;-)

#!/bin/bash
# assuming a cloned repository of GNU Screen in ./screen

cd ./screen
git pull
SCREEN_VERSION=`git-show | head -1 | cut -c8-`
git archive --format=tar --prefix=screen-current/ HEAD >../../down/screen-current.tar
cd ../../down
tar xvf screen-current.tar
cd screen-current/src
sed -e s/devel/${SCREEN_VERSION}/ patchlevel.h >patchlevel.h.tmp
mv patchlevel.h.tmp patchlevel.h
./autogen.sh
./configure --prefix=${HOME}
make
make install

As GNU Screen development is hosted in Git, you can use Git features like commit ID to generate the version. That makes easier to know exactly which version you are running when reporting bugs. I also used a similar approach for Git. And you? What are our favorite two software that make an operating system useful?

Tags :


Footnotes:

1. Of course, you need a pre-installed git on your system