#!/bin/bash

complainAndExit() {
    echo $1
    exit -1
}          

[ ! -f /usr/bin/dpkg ] && \
    complainAndExit "No dpkg binary. Is this a Debian-based system?"

[ ! -d /etc/apt ] && \
    complainAndExit "No /etc/apt directory. Is this a Debian-based system?"

[ ! -d /usr/include/apt-pkg ] && \
    complainAndExit "No /usr/include/apt-pkg/ directory. Is libapt-pkg-dev installed?"

exit 0
