Date: Mon, 11 Oct 1999 17:17:12 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: pavenis AT lanet DOT lv cc: Robert Hoehne , djgpp-workers AT delorie DOT com Subject: Re: djconfig.sh for gdb-4.18 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 11 Oct 1999 pavenis AT lanet DOT lv wrote: > +CONFIG_SHELL=`echo 'echo $0' | bash.exe -` > +case ${CONFIG_SHELL} in *.exe) ;; > + *) CONFIG_SHELL=${CONFIG_SHELL}.exe; > + test -f ${CONFIG_SHELL} || exit 1 > + ;; > +esac; > + > +export CONFIG_SHELL This is a good idea, but there might be one caveat. What does "echo $0" print on your machine, exactly? Specifically, does it use forward- or back-slashes? If it uses back-slashes, Bash (or Make) could choke on such a name when it is later used. Whether the $0 is printed with backslashes or not depends on many installation-dependent details. So I suggest to pass $0 through a simple Sed script that explicitly converts any \ into /, before assigning it to CONFIG_SHELL.