FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-25-2011, 02:28 PM
Amichai Rotman
 
Default Shell Script for Appllication Download

Hello all,
I have a bunch of tools I carry around in my pocket on a USB DoK.
I'd like to write a script to do the following:
1. Check for the latest version

2. If exists - download it3. Send me an e-mail advising me that X application has been downloaded.
This way, I can download the said application or just re-copy the whole folder to my DoK.


My biggest problem is #1 - How do I find out the URL for version check and download?
I am also not so good with scripting, I'd appreciate help with the script code too...


Thanks!
Amichai.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-25-2011, 03:19 PM
Avi Greenbury
 
Default Shell Script for Appllication Download

Amichai Rotman wrote:

> My biggest problem is #1 - How do I find out the URL for version
> check and download?

Well, this varies depending on the app and how it's distributed. I'm
guessing this isn't for apt-provided packages, but for standalone apps?

You'll probably find you need to write a script that will retrieve a
webpage and check for some text in it, perhaps using that text to craft
a link to the latest version.

> I am also not so good with scripting, I'd appreciate help with the
> script code too...

It might be worth, for the excercise, trying a few simpler scripting
tasks first. Do you have any experience? If so, in which languages?
There's probably at least a couple of people who can help, but if
you're already conversant in, say, Python, there's little point in my
sending you Perl hints

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-25-2011, 03:27 PM
Hans Muecke
 
Default Shell Script for Appllication Download

Am Freitag, 25. November 2011, um 09:28:09 schrieb Amichai Rotman:

> I have a bunch of tools I carry around in my pocket on a USB DoK.
>
> I'd like to write a script to do the following:
>
> 1. Check for the latest version
> 2. If exists - download it

"wget -N ftp://site/tool" or "wget -N http://site/tool" would achive this
assuming the name of the tool doesn't change. If the name changes (e.g. name
contains a date or version) you would have to work with a wildcard added to
(parts of) the name.
That way wget checks if the file on the serber is newer, than the onb you have
locally and only will download it if it's newer than the local file.

> 3. Send me an e-mail advising me that X application has been downloaded.

Locally this can be done with setting up a cron job, which will "email" root
(or any other local user)

--
Talk to you later ... Hans (287 to go)

2011/11/25 15:50
EDDS 251550Z 32001KT CAVOK 03/M03 Q1027 NOSIG

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org