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

Use names from sourced lsb-release

parent 440851b3
No related branches found
No related tags found
No related merge requests found
......@@ -26,13 +26,11 @@ mkdir -p "$dest"
7z e -so "$iso_file" casper/filesystem.squashfs > "$workspace"/offlinerepo/filesystem.squashfs
unsquashfs -no-xattrs -d "$workspace"/offlinerepo/squashfs-root "$workspace"/offlinerepo/filesystem.squashfs
ISO_RELEASE="$(grep DISTRIB_CODENAME "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d= -f 2-)"
ISO_VERSION="$(grep DISTRIB_RELEASE "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d= -f 2-)"
ISO_DESCRIPTION="$(grep DISTRIB_DESCRIPTION "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d'"' -f 2)"
echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE} main restricted universe multiverse" > "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-security main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-updates main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-backports main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
source "$workspace/offlinerepo/squashfs-root/etc/lsb-release"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME} main restricted universe multiverse" > "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-security main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-updates main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-backports main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
{
......@@ -41,12 +39,12 @@ apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
} | cut -d"'" -f2 | while read url; do wget -q -nc -P "$dest" "$url"; done
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root install --reinstall --print-uris -qq $packages
mkdir -p "$dest/dists/$ISO_RELEASE/lip/binary-amd64"
( cd "$dest" && dpkg-scanpackages . | gzip > "dists/$ISO_RELEASE/lip/binary-amd64/Packages.gz" )
mkdir -p "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64"
( cd "$dest" && dpkg-scanpackages . | gzip > "dists/$DISTRIB_CODENAME/lip/binary-amd64/Packages.gz" )
cat <<EOF > "$dest/dists/$ISO_RELEASE/lip/binary-amd64/Release"
Archive: $ISO_RELEASE
Version: $ISO_VERSION
cat <<EOF > "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64/Release"
Archive: $DISTRIB_CODENAME
Version: $DISTRIB_RELEASE
Component: lip
Origin: Ubuntu
Label: Ubuntu
......@@ -57,13 +55,13 @@ touch "$dest/.aptignr"
cat <<EOF > "$dest/Release"
Origin: Ubuntu
Label: LIP Ubuntu Extra Packages
Suite: $ISO_RELEASE
Version: $ISO_VERSION
Codename: $ISO_RELEASE
Suite: $DISTRIB_CODENAME
Version: $DISTRIB_RELEASE
Codename: $DISTRIB_CODENAME
Date: $(LC_ALL=C date -u)
Architectures: amd64
Components: lip
Description: $ISO_DESCRIPTION
Description: $DISTRIB_DESCRIPTION
EOF
# Maybe sort files into the usual directory structure ("pool/main/g/glib2.0...")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment