Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
osak
TARDIS
Commits
2d7f46ec
Commit
2d7f46ec
authored
Jan 09, 2019
by
OSAK Buildhauer
Browse files
Made create_offlinerepo.sh more tool-like
parent
5fbc2ee0
Changes
1
Hide whitespace changes
Inline
Side-by-side
create_offlinerepo.sh
View file @
2d7f46ec
#!/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
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment