Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-10 Thread Norbert Thiebaud
On Sun, Oct 10, 2010 at 1:36 PM, Miklos Vajna wrote: > On Sat, Oct 09, 2010 at 11:00:55AM -0500, Norbert Thiebaud > wrote: >>  The problem is that if you are in rootgit/rawbuild/vcl/source for example >>  git-rev-parse with give you ../../ >>  the same result as if you where at >>  rootgit/clone

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-10 Thread Miklos Vajna
On Sat, Oct 09, 2010 at 11:00:55AM -0500, Norbert Thiebaud wrote: > The problem is that if you are in rootgit/rawbuild/vcl/source for example > git-rev-parse with give you ../../ > the same result as if you where at > rootgit/clone/libs-gui/vcl/source > and now you are in the road to readlin

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Tor Lillqvist
> Just to clarify: I posted the script, as I thought it might be useful > to someone else. But I did not intend to commit it to git (If I did, > the post to the ML would have been in the form of a patch) Sure, no problem, my reply was actually more in the context of the recent changes back and

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Norbert Thiebaud
On Sat, Oct 9, 2010 at 10:32 AM, Tor Lillqvist wrote: >> Personal, but valid. To test that you actually don't introduce bashisms >> in a script you can simply set env variable POSIXLY_CORRECT=1 and then >> the bash when invoked as /bin/sh will behave as a strict posix shell. > > Unfortunately tha

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Norbert Thiebaud
i keep forgetting to reply-all to get it to the list :-) On Sat, Oct 9, 2010 at 12:27 AM, Miklos Vajna wrote: > On Fri, Oct 08, 2010 at 08:58:26PM -0500, Norbert Thiebaud > wrote: >> # go up the chain until you find a .git >> while [ ${current_dir} != "/" -a -d "${current_dir}" -a ! -d >> "${c

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Tor Lillqvist
> Personal, but valid. To test that you actually don't introduce bashisms > in a script you can simply set env variable POSIXLY_CORRECT=1 and then > the bash when invoked as /bin/sh will behave as a strict posix shell. Unfortunately that doesn't work well enough- Even with POSIXLY_CORRECT=1 some

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Christian Lohmaier
Hi Fridrich, *, On Sat, Oct 9, 2010 at 10:23 AM, Fridrich Strba wrote: > On 09/10/10 07:54, Tor Lillqvist wrote: >> Just one small nit: As we have members in the community whose platform >> doesn't normally have a /bin/bash, please make sure any new shell script >> introduced works with a plain

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-09 Thread Fridrich Strba
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, On 09/10/10 07:54, Tor Lillqvist wrote: > Just one small nit: As we have members in the community whose platform > doesn't normally have a /bin/bash, please make sure any new shell script > introduced works with a plain non-bash POSIX shell,

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-08 Thread Tor Lillqvist
Just one small nit: As we have members in the community whose platform doesn't normally have a /bin/bash, please make sure any new shell script introduced works with a plain non-bash POSIX shell, and use /bin/sh on the hashbang line. (Just my personal opinion, of course.) --tml __

Re: [Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-08 Thread Miklos Vajna
On Fri, Oct 08, 2010 at 08:58:26PM -0500, Norbert Thiebaud wrote: > # go up the chain until you find a .git > while [ ${current_dir} != "/" -a -d "${current_dir}" -a ! -d > "${current_dir}/.git" ] ; > do > current_dir=$(dirname "${current_dir}") > done do you know 'git rev-parse --show-cdup'

[Libreoffice] small utility script to handle ../bin/g and similar commands

2010-10-08 Thread Norbert Thiebaud
I found myself weary of typing ./ or ../ or ../../ etc to get to ./bin/g an immediate solution is to make an alias with the full path alias g='/home/me/git/oo/build/bin/g' but that imply that you have only one git clone... and I have 2 (one to work in, the other one to build pristine git pull while