delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <20060223173919.12963.qmail@web26109.mail.ukl.yahoo.com> |
Date: | Thu, 23 Feb 2006 18:39:19 +0100 (CET) |
From: | Mark Craddle <kissalika AT yahoo DOT fr> |
Subject: | Problem to launch bash from a shotcut |
To: | cygwin AT cygwin DOT com |
In-Reply-To: | <20060223172644.GG4294@calimero.vinschen.de> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
I work since years with Cygwin and never found a nice way to launch a "standalone" bash script from a shortcut and/or a Windows batch file. Say I have a directory with : bash.exe cygiconv-2.dll cygintl-3.dll cygncurses-8.dll cygreadline6.dll cygwin1.dll my_script (a bash script) launcher.bat (or a shortcut) This directory can be on a cd-rom, an unmapped network share, a local drive, ... Then the directory can be : D:\mydir\ \\server\far away\mydir\ C:\another path with spaces\mydir It will be nice to just to have to double-clic on launcher.bat All I can manage to do is to launch from a mapped drive. launcher.bat : set current_path=%~d0%~p0 "%current_path%bash.exe" "%current_path%my_script" It is perfect, but only for local or mapped drives. note : if I use the -c notation I have to use "%current_path%bash.exe" -c "'%current_path%my_script'" If I try it from a network share I get : \server\far away\my_script: no such file or directory Note the single first reverse slash. I also tried : set current_path=%~d0%~p0 "%current_path%bash.exe" -c "cd '%current_path%'; ./my_script" but I get the same error on the cd. Any idea how I can instruct bash to execute from an unmapped network share ? ___________________________________________________________________________ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |