Am 08.08.2011 15:40, schrieb Eric Blake:
> On 08/07/2011 07:20 PM, Sven Köhler wrote:
>> pathconvert() {
>>echo "$1"
>> }
>>
>
>> (There's one issue here: I would like to write echo -- "$1", but echo
>> doesn't understand --. Bummer.)
>
> echo _cannot_ be used to portably echo arbitrary strin
On 2011-08-07, Eliot Moss wrote:
> On 8/7/2011 9:16 PM, Sven Köhler wrote:
> >Am 30.07.2011 14:14, schrieb Andrey Repin:
> >>Greetings, Corinna Vinschen!
> >>
> For every shell code that I write, I'd like it to be portable both to
> Cygwin
> on Windows, and to Ubuntu Linux for example.
On 8/8/2011 5:11 AM, Sven Köhler wrote:
Am 08.08.2011 10:14, schrieb Andrey Repin:
Greetings, Sven Köhler!
alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
/tmp/openvpn.pid&'
that's where his problem began, IMO.
I don't know, why you pointed that out. It's of no
On 08/07/2011 07:20 PM, Sven Köhler wrote:
pathconvert() {
echo "$1"
}
(There's one issue here: I would like to write echo -- "$1", but echo
doesn't understand --. Bummer.)
echo _cannot_ be used to portably echo arbitrary strings. For that, you
need printf:
pathconvert() {
printf '
Am 08.08.2011 10:14, schrieb Andrey Repin:
> Greetings, Sven Köhler!
>
>>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
>>> /tmp/openvpn.pid &'
>>>
>>> that's where his problem began, IMO.
>
>> I don't know, why you pointed that out. It's of no use to feed a path
>>
Greetings, Sven Köhler!
>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
>> /tmp/openvpn.pid &'
>>
>> that's where his problem began, IMO.
> I don't know, why you pointed that out. It's of no use to feed a path
> like $HOME/something to a pure win32 binary.
You DON
On 8/7/2011 9:16 PM, Sven Köhler wrote:
Am 30.07.2011 14:14, schrieb Andrey Repin:
Greetings, Corinna Vinschen!
For every shell code that I write, I'd like it to be portable both to Cygwin
on Windows, and to Ubuntu Linux for example.
It's kinda possible, but am blocked with such a use case:
Am 02.08.2011 14:24, schrieb Sebastien Vauban:
> I don't like copy/pasting things, and just changing bits of the code, if I can
> avoid it.
if you detect cygwin:
pathconvert() {
// do cygwin specific path conversion of $1
}
if you don't detect cygwin
pathconvert() {
echo "$1"
}
Use the pa
Am 30.07.2011 14:14, schrieb Andrey Repin:
> Greetings, Corinna Vinschen!
>
>>> For every shell code that I write, I'd like it to be portable both to Cygwin
>>> on Windows, and to Ubuntu Linux for example.
>>>
>>> It's kinda possible, but am blocked with such a use case:
>>>
>>> alias vpnup='exec
Greetings, Sebastien Vauban!
>> Must be
>>
>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
>> /tmp/openvpn.pid &'
>>
>> that's where his problem began, IMO.
> That's interesting. I thought this was completely equivalent (~ or $HOME), and
> preferred the shorter vers
> * Eliot Moss (Tue, 02 Aug 2011 11:40:44 -0400)
> > On 8/2/2011 8:24 AM, Sebastien Vauban wrote:
> > > Thorsten Kampe wrote:
> > >> * Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
> > >>> My goal is to have just 1 alias that would work both under Win32
> > >>> (Cygwin) and Ubuntu
> > >>
> > >
On Tue, Aug 02, 2011 at 10:04:43PM +0200, Thorsten Kampe wrote:
>* Eliot Moss (Tue, 02 Aug 2011 11:40:44 -0400)
>> On 8/2/2011 8:24 AM, Sebastien Vauban wrote:
>> > Thorsten Kampe wrote:
>> >> * Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
>> >>> My goal is to have just 1 alias that would wor
* Eliot Moss (Tue, 02 Aug 2011 11:40:44 -0400)
> On 8/2/2011 8:24 AM, Sebastien Vauban wrote:
> > Thorsten Kampe wrote:
> >> * Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
> >>> My goal is to have just 1 alias that would work both under Win32
> >>> (Cygwin) and Ubuntu
> >>
> >> Why don't have
On 8/2/2011 8:24 AM, Sebastien Vauban wrote:
Hi Thorsten,
Thorsten Kampe wrote:
* Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
My goal is to have just 1 alias that would work both under Win32
(Cygwin) and Ubuntu
Why don't have simply put your alias definitions in if [[ $OSTYPE =
cygwin
On Aug 2 14:22, Sebastien Vauban wrote:
> Hi Corinna Vinschen,
>
> Corinna Vinschen wrote:
> > How is that different from using a drive letter like C:? The best you can do
> > is to create a mount point(*) under Cygwin which has the same path as under
> > Ubuntu. Then, just use the same POSIX pat
Hi Csaba,
"Sebastien Vauban" wrote:
> Csaba Raduly wrote:
>> On Mon, Aug 1, 2011 at 8:49 AM, Sebastien Vauban wrote:
>>> Andrey Repin wrote:
Moreover, the very first line is wrong.
Must be
alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
/t
Hi Thorsten,
Thorsten Kampe wrote:
> * Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
>> My goal is to have just 1 alias that would work both under Win32
>> (Cygwin) and Ubuntu
>
> Why don't have simply put your alias definitions in if [[ $OSTYPE =
> cygwin ]]; then else"?
Because I really w
Hi Corinna Vinschen,
Corinna Vinschen wrote:
> How is that different from using a drive letter like C:? The best you can do
> is to create a mount point(*) under Cygwin which has the same path as under
> Ubuntu. Then, just use the same POSIX paths on both systems.
As I put all my files starting a
Hi Corinna,
Corinna Vinschen wrote:
> On Aug 1 08:46, Sebastien Vauban wrote:
>> Corinna Vinschen wrote:
>> >> alias vpnup='exec sudo openvpn --config ~/config/client.vpn --writepid
>> >> /tmp/openvpn.pid &'
>> >>
>> >> While this worked perfectly under Ubuntu, I've had to make up a customized
Hi Csaba,
Csaba Raduly wrote:
> On Mon, Aug 1, 2011 at 8:49 AM, Sebastien Vauban wrote:
>> Andrey Repin wrote:
>>> Moreover, the very first line is wrong.
>>>
>>> Must be
>>>
>>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid
>>> /tmp/openvpn.pid &'
>>>
>>> that's whe
* Sebastien Vauban (Mon, 01 Aug 2011 08:46:52 +0200)
> My goal is to have just 1 alias that would work both under Win32
> (Cygwin) and Ubuntu
Why don't have simply put your alias definitions in if [[ $OSTYPE =
cygwin ]]; then else"?
Thorsten
--
Problem reports: http://cygwin.com/problems
On Aug 1 08:46, Sebastien Vauban wrote:
> Hi Corinna,
>
> Corinna Vinschen wrote:
> >> alias vpnup='exec sudo openvpn --config ~/config/client.vpn --writepid
> >> /tmp/openvpn.pid &'
> >>
> >> While this worked perfectly under Ubuntu, I've had to make up a customized
> >> version for Windows:
>
On Mon, Aug 1, 2011 at 8:49 AM, Sebastien Vauban wrote:
>
> Hi Andrey,
>
> Andrey Repin wrote:
> >>> For every shell code that I write, I'd like it to be portable both to
> >>> Cygwin on Windows, and to Ubuntu Linux for example.
> >>>
> >>> It's kinda possible, but am blocked with such a use case:
Hi Corinna,
Corinna Vinschen wrote:
>> alias vpnup='exec sudo openvpn --config ~/config/client.vpn --writepid
>> /tmp/openvpn.pid &'
>>
>> While this worked perfectly under Ubuntu, I've had to make up a customized
>> version for Windows:
>>
>> alias vpnupwin='cd c:/home/sva/config; openvpn --co
Hi Andrey,
Andrey Repin wrote:
>>> For every shell code that I write, I'd like it to be portable both to
>>> Cygwin on Windows, and to Ubuntu Linux for example.
>>>
>>> It's kinda possible, but am blocked with such a use case:
>>>
>>> alias vpnup='exec sudo openvpn --config ~/config/client.vpn -
Hi Eliot,
Eliot Moss wrote:
> Another way to be portable is to have per-system files to set up some
> environment variables and then uniform portable files that use them. You can
> do that same thing *within* a file by writing conditionals or a case on the
> result of uname. It's probably best to
Hi Larry,
"Larry Hall Cygwin" wrote:
> On 7/29/2011 9:42 AM, Sebastien Vauban wrote:
>> Here, I cd first to my config file, as I removed full paths from client.vpn
>> config file:
>
>
>
>> I'm aware of cygpath, but still don't see clearly which are the best
>> trade-off to be able to write portab
Greetings, Corinna Vinschen!
>> For every shell code that I write, I'd like it to be portable both to Cygwin
>> on Windows, and to Ubuntu Linux for example.
>>
>> It's kinda possible, but am blocked with such a use case:
>>
>> alias vpnup='exec sudo openvpn --config ~/config/client.vpn --writepi
On Jul 29 15:42, Sebastien Vauban wrote:
> Hello,
>
> For every shell code that I write, I'd like it to be portable both to Cygwin
> on Windows, and to Ubuntu Linux for example.
>
> It's kinda possible, but am blocked with such a use case:
>
> alias vpnup='exec sudo openvpn --config ~/config/cli
Another way to be portable is to have per-system files
to set up some environment variables and then uniform
portable files that use them. You can do that same
thing *within* a file by writing conditionals or a
case on the result of uname. It's probably best to
segregate per-system stuff in a well
On 7/29/2011 9:42 AM, Sebastien Vauban wrote:
Here, I cd first to my config file, as I removed full paths from client.vpn
config file:
I'm aware of cygpath, but still don't see clearly which are the best trade-off
to be able to write portable shell code -- if possible. Any hint?
Sounds
Hello,
For every shell code that I write, I'd like it to be portable both to Cygwin
on Windows, and to Ubuntu Linux for example.
It's kinda possible, but am blocked with such a use case:
alias vpnup='exec sudo openvpn --config ~/config/client.vpn --writepid
/tmp/openvpn.pid &'
While this worke
32 matches
Mail list logo