summaryrefslogtreecommitdiff
path: root/trunk/reprap/miscellaneous/LiveCD-scripts/getsources.sh
blob: 17a965ff82d76d242cf5f9f65379aa875f4a880e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

# This is a quick and dirty way of getting all the sources from the repository packages.

# This is designed to be run from writable drive (with lots of space) on a machine booted with the LiveCD

# For this to work you need to have selected a source repository by going into System\Administration\Software Sources
# and ticking the sources tickbox.

# Alternatively, it could be run when you are chrooted in the source folder of the LiveCD (once the iso has been made)
# but you would have to manually change or create the /etc/apt/sources.list to include the sources repositories.

sudo apt-get install dpkg-dev
# Note if dpkg-dev wasn't already installed, then you'll end up with its source anyway

dpkg-query -W --showformat='sudo apt-get source ${Package}\n' > temp.sh


sudo chmod +x temp.sh
mkdir ubuntusources
cd ubuntusources
../temp.sh
rm *.gz
rm *.diff
rm *.dsc
cd ..
rm temp.sh