Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 03-02-2010, 20:23   #1
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default Scripting Help Please - Daz / Garp?

Hi guys, got something that I'd like scripted it possible but not idea where to start.

It's for making iPhone packages to go into a repo. I'd like to be able to run the script from the main folder all files are in, and if that folder moves, the script still works.

1. Run terminal command "dpkg -b" on all folders contained within /apps
2. Move all /apps/*.deb files created to /upload/deb
3. Run terminal command "dpkg-scanpackages -m . /dev/null >Packages" within /upload
4. Create bz2 archive of Packages file in /upload
5. ftp /deb & Pakcages & Packages.bz2 to webspace.

I've tried to create some launchers to do this. No.1 works ok but I can't get a launcher for No.3 to work. If I could script the whole lot it would be so much quicker

Even if you can just sort it roughly and I can fill in the proper directories, that would be great
__________________

Last edited by Desmo; 03-02-2010 at 20:25.
Desmo is offline   Reply With Quote
Old 03-02-2010, 21:15   #2
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

First four, might be bugs...

find /apps -type d -exec /bin/bash -c 'cd {}; dpkg -b' \;
find /apps -type f -name \*.deb -exec mv -f {} /upload/deb \;
cd /upload
dpkg-scanpackages -m . /dev/null | bzip2 >Packages.bz2
Mark is offline   Reply With Quote
Old 04-02-2010, 11:40   #3
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

Cheers Mark, it gives me a base to start from
__________________
Desmo is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:33.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.