Move update parameters to the distribution variable.

This commit is contained in:
fewtarius 2022-12-04 10:12:10 -05:00
parent 826ac676f4
commit 3c352aa37d
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
4 changed files with 35 additions and 18 deletions

View file

@ -7,6 +7,12 @@
# HARDENING (security relevant linker and compiler flags) support
HARDENING_SUPPORT="no"
# The name of the parent organization for updates
GIT_ORGANIZATION="JustEnoughLinuxOS"
# The name of the github project for updates
GIT_REPO="distribution"
# Name of the Distro to build (full name, without special characters)
DISTRONAME="JELOS"

View file

@ -4,15 +4,17 @@
. /etc/profile
ORGANIZATION="JustEnoughLinuxOS"
ORGANIZATION="${GIT_ORGANIZATION}"
BRANCH="$(get_setting updates.branch)"
if [ "${BRANCH}" == "dev" ]
then
PROJECT="distribution-dev"
else
PROJECT="distribution"
fi
case ${BRANCH} in
dev)
PROJECT="${GIT_REPO}-dev"
;;
*)
PROJECT="${GIT_REPO}"
;;
esac
FORCE="$(get_setting updates.force)"

View file

@ -4,15 +4,16 @@
. /etc/profile
ORGANIZATION="JustEnoughLinuxOS"
ORGANIZATION="${GIT_ORGANIZATION}"
BRANCH="$(get_setting updates.branch)"
if [ "${BRANCH}" == "dev" ]
then
PROJECT="distribution-dev"
else
PROJECT="distribution"
fi
case ${BRANCH} in
dev)
PROJECT="${GIT_REPO}-dev"
;;
*)
PROJECT="${GIT_REPO}"
;;
esac
GIT_REPO="https://github.com/${ORGANIZATION}/${PROJECT}"
GIT_API="https://api.github.com/repos/${ORGANIZATION}/${PROJECT}"

View file

@ -135,15 +135,23 @@ echo "${TARGET_VERSION}" > ${INSTALL}/etc/release
cat <<EOF >${INSTALL}/etc/os-release
OS_NAME="${DISTRONAME}"
OS_VERSION="${OS_VERSION}"
HW_DEVICE="${DEVICE}"
HW_ARCH="${ARCH}"
HW_CPU="${HW_CPU}"
GIT_ORGANIZATION="${GIT_ORGANIZATION}"
GIT_REPO="${GIT_REPO}"
HOME_URL="${HOME_URL}"
BUILD_ID="${GIT_HASH}"
BUILD_BRANCH="$(git branch --show-current)"
BUILD_DATE="${BUILD_DATE}"
HW_DEVICE="${DEVICE}"
HW_ARCH="${ARCH}"
EOF
if [ -zn "${HW_CPU}" ]
then
cat <<EOF >>${INSTALL}/etc/os-release
HW_CPU="${HW_CPU}"
EOF
fi
# Add release notes / changelog
if [ -n "${RELEASE_NOTES}" ] && [ -f "${RELEASE_NOTES}" ]; then