[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] gm-adjust_db_settings error on debian
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] gm-adjust_db_settings error on debian |
Date: |
Mon, 9 Dec 2013 08:19:11 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Dec 08, 2013 at 10:10:14PM +0100, Slappinjohn wrote:
> >Brilliant, thanks !
> >
> >It worked during testing because I always ran
> >it from the directory the script was in.
>
> I was just curious because it worked till the 1.4. upgrade.
Before that the created SQL file was put into the
current working directory which was bound to fail
if the script was called from some non-writable
CWD. I adjusted the script to put the SQL file
into /tmp/gnumed/. During testing it worked just
fine because $0 was "./gm-adjust_db_settings.sh"
which expanded to /tmp/gnumed/./gm-adjust_db_settings.sh
However, after installation the script lives in
/usr/(s)bin/ and the path will expand to
/tmp/gnumed//usr/(s)bin/gm-adjust_db_settings.sh
which doesn't work. Hence the need for basename $0.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346