Create /etc/system-release in stage2.

This commit is contained in:
Michael Tremer
2013-09-30 21:16:03 +02:00
parent 065c9931ac
commit d02853e73c
5 changed files with 20 additions and 17 deletions

30
make.sh
View File

@@ -83,6 +83,22 @@ if [ -z $EDITOR ]; then
[ -z $EDITOR ] && exiterror "You should have installed an editor."
fi
# Prepare string for /etc/system-release.
SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})"
if [ "$(git status -s | wc -l)" == "0" ]; then
GIT_STATUS=""
else
GIT_STATUS="-dirty"
fi
case "$GIT_BRANCH" in
core*|beta?|rc?)
SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS"
;;
*)
SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
;;
esac
prepareenv() {
############################################################################
# #
@@ -773,20 +789,6 @@ buildipfire() {
ipfiremake wavemon
ipfiremake iptraf-ng
ipfiremake iotop
if [ "$(git status -s | wc -l)" == "0" ]; then
GIT_STATUS=""
else
GIT_STATUS="-dirty"
fi
case "$GIT_BRANCH" in
core*|beta?|rc?)
echo "$NAME $VERSION ($MACHINE) - $GIT_BRANCH$GIT_STATUS" > $BASEDIR/build/etc/system-release
;;
*)
echo "$NAME $VERSION ($MACHINE) - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" > $BASEDIR/build/etc/system-release
;;
esac
}
buildinstaller() {