FreeBSD Bugzilla – Attachment 117573 Details for
Bug 159665
[patch] ctm(1) does not work with bzip2 or xz compressed files.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.48 KB, created by
Stephen Montgomery-Smith
on 2011-08-10 23:40:07 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Stephen Montgomery-Smith
Created:
2011-08-10 23:40:07 UTC
Size:
1.48 KB
patch
obsolete
>diff -u ctm.1.orig ctm.1 >--- ctm.1.orig 2011-08-10 17:04:53.000000000 -0500 >+++ ctm.1 2011-08-10 17:06:01.000000000 -0500 >@@ -52,8 +52,11 @@ > You can pass a CTM delta on stdin, or you can give the > filename as an argument. > If you do the latter, you make life a lot >-easier for your self, since the program can accept gzip'ed files and >+easier for your self, since the program can accept gzip'ed, >+bzip2'ed, or xz'ed files and > since it will not have to make a temporary copy of your file. >+(If you pass it an xz'ed file, and xz is not part of your base system, >+you will have to install xz from the ports.) > You can > specify multiple deltas at one time, they will be processed one at a > time. >diff -u ctm.c.orig ctm.c >--- ctm.c.orig 2011-08-10 17:15:30.000000000 -0500 >+++ ctm.c 2011-08-10 17:19:23.000000000 -0500 >@@ -211,6 +211,22 @@ > strcat(p,filename); > f = popen(p,"r"); > if(!f) { warn("%s", p); return Exit_Garbage; } >+ } else if(p && !strcmp(p,".bz2")) { >+ p = alloca(20 + strlen(filename)); >+ strcpy(p,"bzcat < "); >+ strcat(p,filename); >+ f = popen(p,"r"); >+ if(!f) { warn("%s", p); return Exit_Garbage; } >+ } else if(p && !strcmp(p,".xz")) { >+ if (system("which -s xz") != 0) { >+ fprintf(stderr, "xz is not installed. You can install it from ports.\n"); >+ return Exit_Garbage; >+ } >+ p = alloca(20 + strlen(filename)); >+ strcpy(p,"xz -dc < "); >+ strcat(p,filename); >+ f = popen(p,"r"); >+ if(!f) { warn("%s", p); return Exit_Garbage; } > } else { > p = 0; > f = fopen(filename,"r");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 159665
: 117573 |
117574