Verified Commit 8d3d28f8 authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

adelie-build-cd: Allow APK version to != VERSION; fix bashism

parent 79631ef3
#!/bin/sh -e
def_arch=$(uname -m)
def_ver="1.0"
def_ver="1.0-rc1"
declare -r PROGNAME=$(basename $0)
......@@ -113,7 +113,8 @@ declare -r KIND=${MY_KIND:-live}
declare -r LDARCH=${LDARCH:-$ARCH}
declare -r PHASE=${MY_PHASE:-all}
declare -r VERSION=${MY_VER:-$def_ver}
declare -r URL=${MY_URL:-https://distfiles.adelielinux.org/adelie/$VERSION/}
declare -r APKVER=${MY_APKVER:-$VERSION}
declare -r URL=${MY_URL:-https://distfiles.adelielinux.org/adelie/$APKVER/}
set +a
ensure_commands
......@@ -212,8 +213,8 @@ make_structure() {
RESOLVE
cat >squashroot-$ARCH/etc/apk/repositories <<-REPOS
https://distfiles.adelielinux.org/adelie/$VERSION/system/$EXTRA_MIRROR
https://distfiles.adelielinux.org/adelie/$VERSION/user/$EXTRA_MIRROR
https://distfiles.adelielinux.org/adelie/$APKVER/system/$EXTRA_MIRROR
https://distfiles.adelielinux.org/adelie/$APKVER/user/$EXTRA_MIRROR
REPOS
# Saves first-sync on the media if a package is required.
apk --root squashroot-$ARCH update
......@@ -327,9 +328,9 @@ create_iso() {
header 'Creating the CD...'
declare -r CD_PARAMS=$(cat iso-params-$ARCH)
CD_VERSION=${CD_VERSION/-alpha/a}
CD_VERSION=${CD_VERSION/-beta/b}
CD_VERSION=${CD_VERSION/-rc/rc}
CD_VERSION=$(echo $CD_VERSION | sed s/-alpha/a/)
CD_VERSION=$(echo $CD_VERSION | sed s/-beta/b/)
CD_VERSION=$(echo $CD_VERSION | sed s/-rc/rc/)
mkdir -p out
xorriso -as mkisofs -o out/adelie-${DO_FULL:-live}-$ARCH-$VERSION-$(date +%Y%m%d).iso -joliet -rational-rock -V "Adelie $CD_VERSION $ARCH" ${CD_PARAMS} cdroot-$ARCH
}
......
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