Correct buggy dispatch logic.
[bpt/emacs.git] / nt / envadd.bat
CommitLineData
e65be2d5
JR
1rem Hack to change/add environment variables in the makefiles for the\r
2rem Windows platform.\r
3rem\r
6d344054 4rem Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.\r
e65be2d5
JR
5rem\r
6rem This file is part of GNU Emacs.\r
7rem\r
8rem GNU Emacs is free software; you can redistribute it and/or modify\r
9rem it under the terms of the GNU General Public License as published by\r
4a9f99bd 10rem the Free Software Foundation; either version 3, or (at your option)\r
e65be2d5
JR
11rem any later version.\r
12rem\r
13rem GNU Emacs is distributed in the hope that it will be useful,\r
14rem but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
16rem GNU General Public License for more details.\r
17rem\r
18rem You should have received a copy of the GNU General Public License\r
19rem along with GNU Emacs; see the file COPYING. If not, write to\r
364c38d3
LK
20rem the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
21rem Boston, MA 02110-1301, USA.\r
e65be2d5
JR
22rem\r
23rem\r
24rem Usage:\r
25rem envadd "ENV1=VAL1" "ENV2=VAL2" ... /C <command line>\r
26rem\r
27rem The "/C" switch marks the end of environment variables, and the\r
28rem beginning of the command line.\r
29rem\r
30rem By Peter 'Luna' Runestig <peter@runestig.com> 2003\r
31\r
32:Loop\r
33if .%1% == ./C goto EndLoop\r
34rem just to avoid an endless loop:\r
35if .%1% == . goto EndLoop\r
36set %1\r
37shift\r
38goto Loop\r
39:EndLoop\r
40\r
41rem Eat the "/C"\r
42shift\r
43rem Now, run the command line\r
44%1 %2 %3 %4 %5 %6 %7 %8 %9\r
4256310d
MB
45\r
46goto skipArchTag\r
47 arch-tag: 148c5181-dbce-43ae-bba6-1cc6e2a9ea75\r
48:skipArchTag\r