cckec / winetricks

Automatically exported from code.google.com/p/winetricks
0 stars 0 forks source link

Problem with SED invocation #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install wine tricks on FreeBSD
2. Run it to install anything
3.

What is the expected output? What do you see instead?

Executing cp 
/home/paul/.wine/dosdevices/c:/windows/temp/_comdlg32ocx/comdlg32.ocx 
/home/paul/.wine/dosdevices/c:/windows/system32/comdlg32.ocx
Executing wine regsvr32 comdlg32.ocx
Successfully registered DLL comdlg32.ocx
Executing w_do_call crypt32
Executing load_crypt32
Executing w_do_call msasn1
Executing load_msasn1
Executing mkdir -p /home/paul/.cache/winetricks/msasn1
Downloading 
http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A0C5-241BFECD095
E/W2KSP4_EN.EXE to /home/paul/.cache/winetricks/msasn1
sed: illegal option -- u
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

What version of the product are you using? On what operating system?

FreeBSD 8.2-RELEASE / Latest

Please provide any additional information below.

All else works fine but sed does not have a -u option!
     sed [-Ealnr] command [file ...]
     sed [-Ealnr] [-e command] [-f command_file] [-I extension] [-i extension]
         [file ...]

Original issue reported on code.google.com by paul.g.w...@googlemail.com on 8 Apr 2011 at 4:36

GoogleCodeExporter commented 8 years ago
bsd sed doesn't support -u, but it does have a similar-ish -l option.

If you replace the -u with -l, does it work, and does it give you a
working progress bar when downloading?

Original comment by daniel.r...@gmail.com on 8 Apr 2011 at 4:49

GoogleCodeExporter commented 8 years ago
Line 358 
sed -u 's/^.* \+\([0-9]\+%\) \+\([0-9,.]\+[GMKB]\) \+\([0-9hms,.]\+\).*$/\1\n# 
Downloading... \2 (\3)/' | \

Replaced with:
sed -I 's/^.* \+\([0-9]\+%\) \+\([0-9,.]\+[GMKB]\) \+\([0-9hms,.]\+\).*$/\1\n# 
Downloading... \2 (\3)/' | \

New error:
sed: -I or -i may not be used with stdin

Maybe a little hacky but if this is what I think and just a replace .. perl -e 
should work on ALL os's

Original comment by paul.g.w...@googlemail.com on 8 Apr 2011 at 5:30

GoogleCodeExporter commented 8 years ago
Thanks for testing.  
I will switch to perl for this bit then, I already depend on it in winetricks.  
Alas, poor sed, I knew ye well.

Original comment by daniel.r...@gmail.com on 8 Apr 2011 at 6:16

GoogleCodeExporter commented 8 years ago
Fixed in svn, r462.

Original comment by daniel.r...@gmail.com on 10 Apr 2011 at 12:55