[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 101/282: checksrc.bat: Fix not being able to run script from the
From: |
gnunet |
Subject: |
[gnurl] 101/282: checksrc.bat: Fix not being able to run script from the main curl directory |
Date: |
Wed, 01 Apr 2020 14:29:26 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 511e0c197ad369ff9dae43d1fdcc65025627e636
Author: Steve Holme <address@hidden>
AuthorDate: Fri Feb 7 16:51:09 2020 +0000
checksrc.bat: Fix not being able to run script from the main curl directory
If the script was ran from the main curl directory rather then the
projects directory then the script would simply exit without error:
C:\url> projects\checksrc.bat
The user would either need to change to the projects directory,
explicitly specify the current working directory, or perform a
oneline hacky workaround:
C:\url> cd projects
C:\url\projects> checksrc.bat
C:\url> checksrc.bat %cd%
C:\url> pushd projects & checksrc.bat & popd
Closes #4894
---
projects/checksrc.bat | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index e2b6b6999..2ca90d033 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -6,7 +6,7 @@ rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____|
rem *
-rem * Copyright (C) 2014 - 2016, Steve Holme, <address@hidden>.
+rem * Copyright (C) 2014 - 2020, Steve Holme, <address@hidden>.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
@@ -31,6 +31,9 @@ rem
***************************************************************************
set CHECK_SRC=TRUE
set CHECK_TESTS=TRUE
set CHECK_EXAMPLES=TRUE
+ set SRC_DIR=
+ set CUR_DIR=%cd%
+ set ARG0_DIR=%~dp0
:parseArgs
if "%~1" == "" goto prerequisites
@@ -88,7 +91,22 @@ rem
***************************************************************************
)
:configure
- if "%SRC_DIR%" == "" set SRC_DIR=..
+ if "%SRC_DIR%" == "" (
+ rem Are we being executed from the "projects" or main directory?
+ if "%CUR_DIR%\" == "%ARG0_DIR%" (
+ set SRC_DIR=..
+ ) else if exist projects (
+ if exist docs (
+ if exist lib (
+ if exist src (
+ if exist tests (
+ set SRC_DIR=.
+ )
+ )
+ )
+ )
+ )
+ )
if not exist "%SRC_DIR%" goto nosrc
:start
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 89/282: altsvc: set h3 version at a common single spot, (continued)
- [gnurl] 89/282: altsvc: set h3 version at a common single spot, gnunet, 2020/04/01
- [gnurl] 96/282: contributors: Also include people who contributed to curl-www, gnunet, 2020/04/01
- [gnurl] 88/282: altsvc: improved header parser, gnunet, 2020/04/01
- [gnurl] 104/282: asyn-thread: remove dead code, gnunet, 2020/04/01
- [gnurl] 92/282: curl: error on --alt-svc use w/o support, gnunet, 2020/04/01
- [gnurl] 99/282: ftp: remove the duplicated user/password struct fields, gnunet, 2020/04/01
- [gnurl] 91/282: docs/HTTP3: add --enable-alt-svc to curl's configure, gnunet, 2020/04/01
- [gnurl] 93/282: ftp: shrink temp buffers used for PORT, gnunet, 2020/04/01
- [gnurl] 102/282: configure.ac: fix comments about --with-quiche, gnunet, 2020/04/01
- [gnurl] 95/282: contrithanks: Use the most recent tag by default, gnunet, 2020/04/01
- [gnurl] 101/282: checksrc.bat: Fix not being able to run script from the main curl directory,
gnunet <=
- [gnurl] 103/282: github: Instructions to post "uname -a" on Unix systems in issues, gnunet, 2020/04/01
- [gnurl] 94/282: scripts: use last set tag if none given, gnunet, 2020/04/01
- [gnurl] 98/282: ftp: remove superfluous checking for crlf in user or pwd, gnunet, 2020/04/01
- [gnurl] 105/282: url: Include the failure reason when curl_win32_idn_to_ascii() fails, gnunet, 2020/04/01
- [gnurl] 100/282: digest: Do not quote algorithm in HTTP authorisation, gnunet, 2020/04/01
- [gnurl] 106/282: altsvc: keep a copy of the file name to survive handle reset, gnunet, 2020/04/01
- [gnurl] 112/282: multi: fix outdated comment, gnunet, 2020/04/01
- [gnurl] 113/282: strerror: Increase STRERROR_LEN 128 -> 256, gnunet, 2020/04/01
- [gnurl] 107/282: smtp: Simplify the MAIL command and avoid a duplication of send strings, gnunet, 2020/04/01
- [gnurl] 111/282: easy: remove dead code, gnunet, 2020/04/01