-1

How to download the most recent packages in deb files (all in a folder) for my platform (x86_64/i386) & distro with bash script? There is no PPA for this apps.

So I'm interesting in automatization (downloading the most recent deb packages for my platform/distributive) of the process of downloading deb files, not manual downloading.

Offline manual download not the case, here but if some files are present locally we can skip to download them. I'm not interesting in downloading deb files from other computer. So files to be downloaded should much next pattern: {http|ftp}://updates.etersoft.ru/pub/Etersoft/[the most recent version available for my platform and distributive]/last[/x84_64 if needed]/Ubuntu/[my distributive]/*.deb

Here are some examples of URLs to download:

ftp://updates.etersoft.ru/pub/Etersoft/Postgres@Etersoft/9.2.1/x86_64/Ubuntu/12.04/libpq5.5-9.2eter_9.2.1-eter1ubuntu_amd64.deb

ftp://updates.etersoft.ru/pub/Etersoft/Postgres@Etersoft/9.2.1/Ubuntu/12.04/libpq5.5-9.2eter_9.2.1-eter1ubuntu_i386.deb

http://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft/2.1.3/HASP /x86_64/Ubuntu/12.04/haspd_3.3-eter5ubuntu_amd64.deb

http://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft/2.1.3/HASP/Ubuntu/12.04/haspd_3.3-eter5ubuntu_i386.deb

My current disributive is Ubuntu x86_64 12.04.04 LTS Thanks.

BBK
  • 2,069
  • What is your final goal? May this is your solution? – c0rp Feb 14 '14 at 07:35
  • you mean downloading all the .deb files from updates.etersoft.ru/pub/Etersof. – Avinash Raj Feb 14 '14 at 07:37
  • You're trying to download update packages for your Ubuntu from a different computer? – Kushal Feb 14 '14 at 08:05
  • 1
    You mean downloading this http://updates.etersoft.ru/pub/Etersoft//*/last/Ubuntu/12.04/ – kamil Feb 14 '14 at 08:06
  • 2 c0rp - offline manual download noth the case. 2 Kush I downloading deb files NOT from other computer. 2 Avinash Raj & kamil: I interesting in downloading files with next pattern updates.etersoft.ru/pub/Etersoft/[the most cirrent version avaliable for my platform and distributive]/last[/x84_64 if needed]/Ubuntu/[my distributive]/*.deb – BBK Feb 14 '14 at 08:13
  • This question needs a bounty – kamil Feb 14 '14 at 08:52

2 Answers2

2

Your script should be something like this:

wget --mirror http://updates.etersoft.ru/pub/Etersoft/ --level=1 --reject=index.html -nH -np
for i in $(ls pub/Etersoft); do
wget -r -A .deb http://updates.etersoft.ru/pub/Etersoft/$i/last/x86_64/Ubuntu/12.04/ --reject=index.html 
done

First I mirrored all directories inside Etersoft/ and then I did a loop to get .deb files

Note: in this particular website not all directories are the same hierarchy and structure. modify the script at your needs. I only given the idea.

kamil
  • 7,355
  • 7
  • 40
  • 61
0

If you have to complete URL of deb packages then you can simply use wget command as follows in your shell script:

wget htp://your-url-for-deb-file

Now if you want to install these packages then add

dpkg -i *.deb

You can add the cron job to run this shell script after specific period of time!

hope this helps!

Null pointer
  • 2,547
  • 5
  • 26
  • 38
  • As you can see in the title I'm interesting in automatization (downloading the most recent deb packages for my platform/distributive) the process not manual download. – BBK Feb 14 '14 at 08:16