clivesay
Group: Guests
Posts: 935
Joined: Dec. 2003 |
|
Posted: July 06 2004,02:58 |
|
Here is what I did to help me when I had a lot of deb packages to sort through. This was my first jump into bash scripting!!
BTW - if anyone has a shorter routine than Tecker's please feel free to share!!
Remember I am a complete beginner to scripting. There might be an easier way! I will use tuxpaint as an example.
After I do an "apt-get -d install tuxpaint" to collect all the debs, I cd to /var/cache/apt/archive to see all the files. Within the directory I type "ls -1 > paint". This created a "paint" text file that has a list of all the files in the /archive directory. I open the "paint" file with scite and remove any entries that are not .debs related to tuxpaint. I then type "dpkg --extract " in front of the first entry and then copy and paste that command in front of each deb file. Then after the name of the first deb file I type " ./paint". I copy that entry and then paste it after each deb. After I have pasted, I go back and put a 1,2,3,4, etc after each of the " ./paint" lines.
Then I run "chmod a+x paint". Now I have an executable script that will extract all of the deb files and create the individual folders for each one.
The file will look like:
#!/bin/bash
dpkg --extract bc_1.06-15_i386.deb ./paint1
dpkg --extract libnetpbm10_2%3a10.0-3_i386.deb ./paint2
dpkg --extract libsdl-image1.2_1.2.3-2_i386.deb ./paint3
dpkg --extract libsdl-mixer1.2_1.2.5-5_i386.deb ./paint4
dpkg --extract libsdl-ttf2.0-0_2.0.6-5_i386.deb ./paint5
dpkg --extract libsdl1.2debian-oss_1.2.7-7_i386.deb ./paint6
dpkg --extract libsdl1.2debian_1.2.7-7_i386.deb ./paint7
dpkg --extract libsmpeg0_0.4.5+cvs20030824-1_i386.deb ./paint8
dpkg --extract netpbm_2%3a10.0-3_i386.deb ./paint9
dpkg --extract ttf-freefont_20031008-1_all.deb ./paint10
dpkg --extract tuxpaint-data_1%3a0.9.13-2_all.deb ./paint11
dpkg --extract tuxpaint-stamps-default_2003.12.23-1_all.deb ./paint12
dpkg --extract tuxpaint_1%3a0.9.13-2_i386.deb ./paint13
It seems like alot of steps but is really pretty simple to throw together. I think it is easier than extracting each deb manually. I actually ran all of my commands from the root command line in emelfm.
HTH someone.
Chris
|