Skip to content
Snippets Groups Projects
Commit 2d7f46ec authored by OSAK Buildhauer's avatar OSAK Buildhauer
Browse files

Made create_offlinerepo.sh more tool-like

parent 5fbc2ee0
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -e
set -x
iso_file="ubuntu-18.04.1-desktop-amd64.iso"
usage () {
echo "usage: create_offlinerepo.sh repodir isofile [list of packages]" >&2
echo >&2
echo "Downloads all packages required to fully update the system in 'isofile' and" >&2
echo "to install the listed packages and adds them to the package archive in 'repodir'." >&2
exit 1
}
dest="$1"
shift || usage
iso_file="$1"
shift || usage
packages="$@"
workspace="/workspace"
dest="archive"
packages="vim htop"
rm -rf "$workspace"/offlinerepo
mkdir -p "$workspace"/offlinerepo
......@@ -23,6 +33,7 @@ apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
{
cd "$dest"
rm -rf "$dest"/Packages.*
dpkg-scanpackages . | gzip > Packages.gz
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment