comparison scripts/miscellaneous/tar.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 81a755db4db4
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
45 endif 45 endif
46 46
47 if (ischar (tarfile) && iscellstr (files) && ischar (root)) 47 if (ischar (tarfile) && iscellstr (files) && ischar (root))
48 48
49 cmd = sprintf ("tar cvf %s -C %s %s", tarfile, root, 49 cmd = sprintf ("tar cvf %s -C %s %s", tarfile, root,
50 sprintf (" %s", files{:})); 50 sprintf (" %s", files{:}));
51 51
52 [status, output] = system (cmd); 52 [status, output] = system (cmd);
53 53
54 if (status == 0) 54 if (status == 0)
55 if (nargout > 0) 55 if (nargout > 0)
56 if (output(end) == "\n") 56 if (output(end) == "\n")
57 output(end) = []; 57 output(end) = [];
58 endif 58 endif
59 entries = strsplit (output, "\n"); 59 entries = strsplit (output, "\n");
60 entries = entries'; 60 entries = entries';
61 endif 61 endif
62 else 62 else
63 error ("tar: tar exited with status = %d", status); 63 error ("tar: tar exited with status = %d", status);
64 endif 64 endif
65 65
66 else 66 else
67 error ("tar: expecting all arguments to be character strings"); 67 error ("tar: expecting all arguments to be character strings");
68 endif 68 endif