Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-09-14 22:54:17 +0400
committermboelen <michael@cisofy.com>2014-09-14 22:54:17 +0400
commita38b2bcc2293ca79aa76162684c5405bda9770e2 (patch)
tree19dbaf08772a473e492ca24cd320e88e9e4b764a /dev
parent7a2daf92ad1aa28571403b5f2cdab8d319cb32fb (diff)
Updated build script
Diffstat (limited to 'dev')
-rwxr-xr-xdev/build-lynis.sh55
1 files changed, 35 insertions, 20 deletions
diff --git a/dev/build-lynis.sh b/dev/build-lynis.sh
index d18baeb9..b6837326 100755
--- a/dev/build-lynis.sh
+++ b/dev/build-lynis.sh
@@ -126,12 +126,12 @@
# Check binaries
- BZRBINARY=`which bzr`
- if [ ! "${BZRBINARY}" = "" ]; then
- echo "[=] bzr = ${BZRBINARY}"
+ GITBUILDPACKAGEBINARY=`which git-buildpackage`
+ if [ ! "${GITBUILDPACKAGEBINARY}" = "" ]; then
+ echo "[=] git-buildpackage = ${GITBUILDPACKAGEBINARY}"
else
- echo "[X] Can not find bzr binary"
- echo " Hint: install bzr"
+ echo "[X] Can not find git-buildpackage binary"
+ echo " Hint: install git-buildpackage"
ExitFatal
fi
@@ -235,29 +235,44 @@
echo "[*] Starting with DEB building process"
- BZRSTATUS=`${BZRBINARY} status . 2>&1 > /dev/null; echo $?`
- if [ "${BZRSTATUS}" = "0" ]; then
- echo "[V] bzr has proper directory tree"
- DEBCHANGELOGFULLVERSION=`head -1 debian/changelog | awk '{ print $2 }' | sed 's/(//' | sed 's/)//'`
+ DEBCHANGELOGFULLVERSION=`head -1 ../debian/changelog | awk '{ print $2 }' | sed 's/(//' | sed 's/)//'`
DEBCHANGELOGVERSION=`echo ${DEBCHANGELOGFULLVERSION} | awk -F- '{ print $1 }'`
DEBCHANGELOGVERSIONREV=`echo ${DEBCHANGELOGFULLVERSION} | awk -F- '{ print $2 }'`
- echo "[=] Version in Debian changelog: ${DEBCHANGELOGVERSION} (revision: ${DEBCHANGELOGVERSIONREV})"
if [ "${LYNIS_VERSION}" = "${DEBCHANGELOGVERSION}" ]; then
echo "[V] Debian/changelog up-to-date"
else
echo "[X] Debian/changelog outdated"
ExitFatal
fi
- # execute command
- # bzr builddeb . --build-dir ${DEBWORKDIR}/build-area/ --result-dir ${DEBWORKDIR}
- elif [ "${BZRSTATUS}" = "3" ]; then
- echo "[X] Tree is not initialized for BZR"
- echo " Hint: run bzr init while being in lynis directory (or bzr init ..)"
- ExitFatal
- else
- echo "[X] Unknown error"
- echo "Output: ${BZRSTATUS}"
- fi
+
+# BZRSTATUS=`${BZRBINARY} status . 2>&1 > /dev/null; echo $?`
+# if [ "${BZRSTATUS}" = "0" ]; then
+# echo "[V] bzr has proper directory tree"
+# DEBCHANGELOGFULLVERSION=`head -1 debian/changelog | awk '{ print $2 }' | sed 's/(//' | sed 's/)//'`
+# DEBCHANGELOGVERSION=`echo ${DEBCHANGELOGFULLVERSION} | awk -F- '{ print $1 }'`
+# DEBCHANGELOGVERSIONREV=`echo ${DEBCHANGELOGFULLVERSION} | awk -F- '{ print $2 }'`
+# echo "[=] Version in Debian changelog: ${DEBCHANGELOGVERSION} (revision: ${DEBCHANGELOGVERSIONREV})"
+# if [ "${LYNIS_VERSION}" = "${DEBCHANGELOGVERSION}" ]; then
+# echo "[V] Debian/changelog up-to-date"
+# else
+# echo "[X] Debian/changelog outdated"
+## ExitFatal
+# fi
+# # execute command
+# # bzr builddeb . --build-dir ${DEBWORKDIR}/build-area/ --result-dir ${DEBWORKDIR}
+# elif [ "${BZRSTATUS}" = "3" ]; then
+# echo "[X] Tree is not initialized for BZR"
+# echo " Hint: run bzr init while being in lynis directory (or bzr init ..)"
+# ExitFatal
+# else
+# echo "[X] Unknown error"
+# echo "Output: ${BZRSTATUS}"
+# fi
+
+ cd ..
+ git-buildpackage --git-tarball-dir=${MYBUILDIDR} --git-export-dir=${DEBWORKDIR}
+ cd ${MYWORKDIR}
+
echo "[V] Done"