Commit 2d8e0983 authored by OSAK Buildhauer's avatar OSAK Buildhauer

Use names from sourced lsb-release

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