Skip to content
Snippets Groups Projects
Commit 6a57ed58 authored by Markus Frosch's avatar Markus Frosch
Browse files

icinga2: Add diff tool

parent 1bbf02b2
No related branches found
No related tags found
No related merge requests found
/.debian_packaging/
diff 0 → 100755
#!/bin/bash
set -e
cd "$(readlink -f "$(dirname "$0")")"
target="${1%/}"
branch="$target"
debian_git=https://anonscm.debian.org/git/pkg-nagios/pkg-icinga2.git
case "$target" in
jessie|wheezy)
branch="debmon-$target"
;;
stretch)
branch=master
;;
ubuntu)
;;
*)
echo "Please specify what to diff, target '$target' is unknown!" >&2
exit 1
;;
esac
if [ ! -d .debian_packaging ]; then
git clone -q "$debian_git" .debian_packaging/
else
( cd .debian_packaging && git fetch )
fi
(
cd .debian_packaging/
git clean -qfdx
git checkout -fq "$branch"
git pull -q
)
echo "# Diffing from Debian packaging"
echo "# GIT Url: $debian_git"
echo "# Branch: $branch"
echo "#"
# check version
version_here=`dpkg-parsechangelog -S Version -l "$target"/debian/changelog`
version_debian=`dpkg-parsechangelog -S Version -l .debian_packaging/debian/changelog`
if dpkg --compare-versions "$version_debian" gt "$version_here"
then
echo "# NEWER VERSION ON DEBIAN!" >&2
fi
echo "# Icinga version: $version_here"
echo "# Debian version: $version_debian"
echo "#"
echo "# You can update the version with the following command:"
echo "# dch --changelog $target/debian/changelog --newversion '$version_debian' --distribution 'icinga-$target'"
echo "#"
diff -Naur -x "changelog" .debian_packaging/debian/ "$target"/debian/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment