Note that there are some explanatory texts on larger screens.

plurals
  1. POCocoa: Using UNIX based commands to write a file
    primarykey
    data
    text
    <p>I'm looking for help with a program im making. I create a *.sh file as follows:</p> <p>SVN_StatGenAppDelegate.h:</p> <pre><code>NSWindow *window; NSTask *touch; NSArray *touchArguments; NSString *svnURLStr; NSString *SVNStatStr; NSString *destDirStr; </code></pre> <p>SVN_StatGenApplDelegate.m:</p> <pre><code> NSString *locationStr = [NSString stringWithFormat:@"%@/exec.sh", destDirStr]; NSLog(@"%@", locationStr); touch = [[NSTask alloc] init]; [touch setLaunchPath:@"/usr/bin/touch"]; touchArguments = [NSArray arrayWithObjects:locationStr, nil]; [touch setArguments:touchArguments]; [touch launch]; </code></pre> <p>This works, i get a file called exec.sh created in the location i craete with the destDirStr. Now is my next question, i need to get that file filled with the following:</p> <pre><code>svn co http://repo.com/svn/test C:\users\twan\desktop\pres\_temp cd C:\users\twan\desktop\pres\_temp svn log -v --xml &gt; logfile.log copy C:\users\twan\desktop\statsvn.jar C:\users\twan\desktop\pres\_temp cd .. java -jar _temp\statsvn.jar C:\users\twan\desktop\pres\_temp/logfile.log C:\users\twan\desktop\pres\_temp rmdir /s /Q _temp </code></pre> <p>The actual idea is that this script is written into the sh file, and all the _temp and other locations are replaced by the vars i get from textfields etc.</p> <p>so c:\users\twan\desktop\pres_temp would be a var called tempDirStr that i get from my inputfields.</p> <p>(i know these cmomands and locations are windows based, im doing this with a friend and he made a .net counterpart of the application.</p> <p>Can you guys help me out?:D thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload