The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
get-omnifocus.sh version 1.0 released Thread Tools Search this Thread Display Modes
In response to a request in this thread:

http://forums.omnigroup.com/showthread.php?t=4245

I am releasing a shell script that I have written which downloads and installs the latest version of OmniFocus.

Use at your own risk. Really. I mean it.

Here's the installation process. NOTE: you will need to be at least a little comfortable editing text files and using Terminal.app to make this work.


1) Write this down: "I <insert name here> do solemly swear that I am solely responsible for my own actions and hereby take full responsibility for whatever this script does to my data, my love life, and the acne on my back."

2) Sign it, Date it, and Post it on wall above monitor

3) download

http://tj.tntluoma.com/files/get-omnifocus.sh

(Note: Safari calls it an "Application")

4) Open the file in a text editor (such as BBEdit or TextWrangler -- NOT Microsoft Word or any other app which might convert it from plain text)

5) Read over the parts at the top. You will need to enter the username and password that you use to download OmniFocus. If you don't have that, search your email archive.

You need to change, AT MINIMUM, three lines, which begin with

EULA=

LOGIN=

PASSWORD=

And a 4th if you have installed OmniFocus anywhere other than /Applications/ such as ~/Applications/

6) Save the file to your Desktop (it may already be saved there, but you need to make sure you save your changes)

7) Open Terminal.app

8) Read the note posted on the wall above your monitor

9) Type this (I recommend that you copy and paste each line to avoid typos)

mkdir -p ~/bin/

cd Desktop

chmod 755 get-omnifocus.sh

mv -i get-omnifocus.sh ~/bin/

10) That will 'install' the script. To run it, simply type:

~/bin/get-omnifocus.sh

and watch what it says.


NOTE: Do *NOT* use this script in 'cron' or some other automated way. If you want to know when the newest builds are available, follow the RSS feed at

http://www.omnigroup.com/appcast/?ti...ack=sneakypeek


If the sign over your monitor didn't make it abundantly clear, you are using this entirely at your own risk.

All I will say is that I have been using it for a couple of weeks without any problems. I just added a bit more error catching code before posting it here.

A few more notes:

The script tries to make sure that OmniFocus is not running before it installs a new version. It can, however, safely check to see if there is a new version while OmniFocus is running. It will just not do the install until you manually quit OmniFocus.

When a new version is found, the old version is moved to your Recycle Bin with the build number attached. For example if you were using build 1100 and build 1200 came out, build number 1200 would get installed and in your Recycle Bin you would see:

OmniFocus.1100.app

which tells you what build it was in case you need to downgrade OmniFocus (just don't empty your trash until you make sure the new version works :-)

Please post questions and comments back to this thread
 
Dude! You win my hero of the week!

Very cool.

One problem...
Fatal error. There already appears to be a program installed at /Applications/OmniFocus.app

The application downloaded correctly.
I have two user accounts.
Admin
myUser

I usually have to authenticate to install. I'm assuming this script will handle that? Maybe that is why this error is appearing?

This should probably be posted in the OmniFocus Extras forum.
 
Another suggestion...

using iCal, I can schedule an event to fire off every night... or hour or whatever time. I can use iCal to open the .sh file. (I have to use TinkerTool to make hidden files visible first).

What would you think about modifying the script, so that when the script runs... it checks for a newer version, downloads it, mounts the disk image, and then asks prompts to quit OF. That way, if the script is stalled, the newer version has still downloaded and all I have to do quit OF, drag the newer version to applications & authenticate.
 
Quote:
Originally Posted by SpiralOcean
Another suggestion...

using iCal, I can schedule an event to fire off every night... or hour or whatever time. I can use iCal to open the .sh file. (I have to use TinkerTool to make hidden files visible first).

What would you think about modifying the script, so that when the script runs... it checks for a newer version, downloads it, mounts the disk image, and then asks prompts to quit OF. That way, if the script is stalled, the newer version has still downloaded and all I have to do quit OF, drag the newer version to applications & authenticate.
The new version IS downloaded before you are prompted to quit OmniFocus.

I did this explicitly because I'm used to working on a slow connection where OmniFocus might take 30 minutes to download.

So you can run it whenever you want and it will wait for you to quit OmniFocus.

However, my suggestion is to quit OmniFocus before you go to bed.

Why?

Alpha programs often have memory leaks (I don't know that OF does, just saying it's possible).

Also, then when you come to the computer in the AM it will be waiting with an EULA.

How long does it take OF to download for you? If it's not too long I'd just suggest that you make updating it the first thing you do in the morning. Otherwise the OmniGurus may have released ANOTHER version since the time you started this. That's why I recommend not automating the download.
 
You are right about the automation... I was thinking of having it check every min for a new version and then downloading... I'm sure thee omnions would love for everyone to do that... ;)

Running the app in the morning is probably what I'll do.

Nice job on the application... It's perfect the way it is. :)
 
Quote:
Originally Posted by SpiralOcean
One problem...
Fatal error. There already appears to be a program installed at /Applications/OmniFocus.app

The application downloaded correctly.
I have two user accounts.
Admin
myUser

I usually have to authenticate to install. I'm assuming this script will handle that? Maybe that is why this error is appearing?
Yes, that's entirely likely. If your user doesn't have permission to

move /Applications/OmniFocus.app to ~/.Trash/

copy /Volumes/OmniFocus/OmniFocus.app to /Applications (or wherever you have it installed)

then it won't work

The easiest way to get around this would be to use 'sudo'

sudo get-omnifocus.sh

and then enter your admin password. I'm not sure about the potential security implications of that, so again, use at your own risks. You could also put various 'sudo' calls in the script, but the problem is that you might have to enter your password several times depending on how long it took to download, etc.

Another option (probably safer) is to put OmniFocus in ~/Applications instead of /Applications/

Are there multiple people on your computer using OmniFocus? If not, ~/Applications/ would be a good choice. You don't need to use sudo for that.

Given that the final version will probably make this script completely obsolete, I'd use ~/Applications/ in the short term



Quote:
Originally Posted by SpiralOcean
This should probably be posted in the OmniFocus Extras forum.
I didn't reaize there were two forums for OF.
 
Quote:
Originally Posted by SpiralOcean
You are right about the automation... I was thinking of having it check every min for a new version and then downloading... I'm sure thee omnions would love for everyone to do that... ;)
Enough people do that and I suspect that I'd find myself bound, gagged, and thrown into the river with cement handcuffs, and the last thing I'd hear is "Ken Case says hello."

Quote:
Originally Posted by SpiralOcean
Running the app in the morning is probably what I'll do.
Here's my morning ritual:

1) Shut off alarm
2) Open MacBook
3) run 'get-omnifocus.sh'
4) Go to the bathroom, brush teeth, etc
5) Click on EULA
6) Launch OmniFocus

Hrm.

That made me realize something....

I just added

open -a OmniFocus

to the script (at the very bottom, right above 'exit 0' and 'eof') so the script will launch OmniFocus when it's done :-)
 
Quote:
Originally Posted by luomat
Enough people do that and I suspect that I'd find myself bound, gagged, and thrown into the river with cement handcuffs, and the last thing I'd hear is "Ken Case says hello."
Yes... Ken Case doesn't read books. He stares them down until he gets the information he wants.
 
I've also heard...
The boogeyman checks for Ken Case under his bed before going to sleep.
 
Quote:
Originally Posted by luomat
I didn't reaize there were two forums for OF.
Hope you don't mind that I've relocated it for you.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
OmniFocus 1.10.4 for Mac released Lizard OmniFocus 1 for Mac 0 2012-10-26 09:10 AM
OmniFocus 1.10.2 released Lizard OmniFocus 1 for Mac 0 2012-05-30 11:35 AM
OmniFocus 1.5 released Lizard OmniFocus for iPad 0 2012-03-16 08:50 AM
OmniFocus 1.10 released Lizard OmniFocus 1 for Mac 0 2012-03-16 08:44 AM
OmniFocus released! (sort of) ejacob OmniFocus 1 for Mac 2 2007-05-04 09:59 PM


All times are GMT -8. The time now is 11:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.