X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=EsQOU4Q+uQCHoJuf cgZQ9STiT6u+KKSX0Bkj1II6OXmBP2nJzXGGBWdvjxtLp+zRoWifAbde3YALwxal uzNsuyy93zZBc2m1SE9T++282sCptuPXT2/GU/vR80Lb+4HPD7qfonUb15yg789y XKJro35d7/iL9amIZaHTzYRSCuQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=BijzjRUnEPMQjwl9R3yjtE SFwHg=; b=HhYVx8Gb7NbDxB+TueLz7z+9KjD8pzzsf6lPwpnA0TzJWvz2pAS4vJ G+35hPrpuEwK7R+InTzjKIAcz58+ElsfvfnZEpvTJZYnMq9jUOHSeQKJaVrsC89P qB7d28czAW68mU6KdkBU3xwxByo2mTM+Blfk6Fv9ZXvFe9BLxd5JI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,KAM_THEBAT,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Sun, 16 Feb 2014 18:41:31 +0400 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <40596392.20140216184131@yandex.ru> To: Corinna Vinschen Subject: Re: Little cygpath improvement request In-Reply-To: <20140216120042.GP2246@calimero.vinschen.de> References: <111910987 DOT 20140214222230 AT mtu-net DOT ru> <52FE6397 DOT 5010105 AT cygwin DOT com> <187072112 DOT 20140214234339 AT mtu-net DOT ru> <20140215125606 DOT GM2246 AT calimero DOT vinschen DOT de> <1745533059 DOT 20140215225708 AT mtu-net DOT ru> <20140216120042 DOT GP2246 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Corinna Vinschen! >> >> >> I would like to request a small functional change for cygpath. >> >> >> In the event of empty given path argument (i.e. `cygpath -ml ""') silently >> >> >> return an empty result without error message. >> >> >> This would greatly simplify wrapper scripts. >> >> >> >> > Why isn't redirecting the message to /dev/null not sufficient, something >> >> > like this (bash syntax)? >> >> >> >> Because it'll require creating a redirection? And this kind of redundant >> >> inserts blurring the code. >> >> Returning a non-zero exit code would suffice for debugging purposes. >> >> >> >> > cygpath -ml "" >/dev/null 2&>1 >> >> >> >> Err, not > /dev/null !!! :D >> >> > dos_path=$( [ -n "${posix_path}" ] && cygpath -ml "${posix_path}" ) >> >> > ? >> >> I appreciate the effort, bit this even MORE complicating the possible use >> case. >> >> Look, I'm asking for simplification without loosing functionality. >> If I NEED to check the path for existence, I would write something to the >> extent of > I'm getting a bit puzzled. If it's only the message you don't want, > then why not just send this message to /dev/null??? Because the message serves no purpose in every use case I could think about. That, aside the fact it needs to create a redirection. > NATIVE=$(cygpath -ml "$2" 2>/dev/null) >> But if I (and the program that I would feed it to) don't care (which is often >> the case), the message printed from cygpath doesn't add to functionality. >> >> P.S. >> I've tried to rebuild it myself, but hit a roadblock. >> While trying to rebuild only winsup/utils, this happens > That never works. Why don't you just fetch the source archive from > the last package and use the cygport file inside? Because I'm building Cygwin itself the first time. When my attempt at saving time in hope it would "just work" failed, I followed FAQ to the letter, but got nowhere either. The list of required packages to compile it seems to be right, though. I've eventually succeed. -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 16.02.2014, <17:33> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple