tags:

views:

911

answers:

2

At the moment I have a console application. I would like to be able to exit the application, update through svn, recompile and then relaunch. This is running under a Linux environment. At the moment I'm not sure how I would be able to relaunch the application. Is there a way to do this?

+1  A: 

You could create a file, say .relaunch, when you exit the application in the specified circumstance and have the compile script remove the file and start the application when it has finished compiling if the relaunch file exists.

Robert Gamble
Why the downvote?
Robert Gamble
removed the downvote. I've been affected by a few downvotes without exlanation.
anjanb
+1  A: 

There is a low tech way to do this - assuming you want it all done in code:

1) Have your app launch a separate process (then exit) that:
a) Calls the svn.exe (or get svnkit...) with args to get the latest source
b) Calls you ant or whatever script to compile
c) Exec your newly compiled app
d) Exit

AdamC