Reputation: 3
I am trying to make a simple command line tool in Xcode, that will allow me to make a tar.gz out of a specific folder. I want to see if i can make a program to autorun the command line, instead of typing it in every time i want to make a tar.gz out of something.
int main (int argc, const char * argv[]) {
// insert code here...
tar czvf SealTeamSix.tar.gz /Users/mdonovan14/Blah
return 0;
}
I understand that i am not setting this up right. How would i go about doing this?
Upvotes: 0
Views: 1372
Reputation: 125007
You'd be better off using Automator to create a script that runs that snippet of shell script. Do the following:
As it is, you're trying to mix shell scripting into a C program. You can certainly run shell scripts from C using the system() function, but using Automator here as described above is a much friendlier process.
Upvotes: 1