create_offline_repo.sh 1.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
PKG_LIST="linux-firmware-nonfree swi-prolog cowsay fish get-flash-videos gnome haskell-platform java7-jdk imagemagick rxvt-unicode moc nethack-console scrot sl tmux vim xcowsay zsh zsh-doc texmaker gimp pidgin smplayer subversion git lftp inkscape"
DESTINATION="/isodevice"
SECTIONNAME=lipoffline
ARCHITECTURE=$1
ARCHIVE_DESTINATION=$DESTINATION/archives
REL_DISTS_PATH=dists/main/$SECTIONNAME/binary-$ARCHITECTURE
PKG_DESTINATION=$ARCHIVE_DESTINATION/$REL_DISTS_PATH

#begin
echo "creating structure..."
mkdir -p $PKG_DESTINATION/
echo "done."
echo "downloading archives. this may take some time..."
wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2)
#wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --allow-unauthenticated --print-uris -qq $PKG_LIST | cut -d"'" -f2)
echo "done."
echo "creating meta files..."
cd $ARCHIVE_DESTINATION
apt-ftparchive packages $REL_DISTS_PATH > $REL_DISTS_PATH/Packages
gzip $REL_DISTS_PATH/Packages
echo "done."