03-02-2010, 20:23 | #1 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
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. |
03-02-2010, 21:15 | #2 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
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 |
04-02-2010, 11:40 | #3 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
Cheers Mark, it gives me a base to start from
__________________
|