diff --git a/src/freedombone b/src/freedombone index fd0794aa62318d9de435468782458a1ad1ff7067..54d18d72543a86d878306715049545d876357e12 100755 --- a/src/freedombone +++ b/src/freedombone @@ -33,8 +33,27 @@ PROJECT_NAME='freedombone' export TEXTDOMAIN=$PROJECT_NAME export TEXTDOMAINDIR="/usr/share/locale" +# check that this is installing on an appropriate +# debian system. If you try to install on an ubuntu +# base then that will definitely fail +installing_on_debian=1 if [ ! -f /usr/bin/apt-get ]; then - echo $'You should only run this on a Debian based system' + installing_on_debian= +fi + +if [ ! -f /etc/apt/sources.list ]; then + installing_on_debian= +else + if ! grep -q 'stretch' /etc/apt/sources.list; then + installing_on_debian= + fi + if ! grep -q 'debian' /etc/apt/sources.list; then + installing_on_debian= + fi +fi + +if [ ! $installing_on_debian ]; then + echo $'You should only run this on a Debian Stretch based system' exit 0 fi