#!/usr/bin/env bash
STATUS=0

# run paperwork-cli one time to generate configuration files
paperwork-cli

paperwork-cli --help

# Check that command 'chkdeps' cannot be run
paperwork-cli --help | grep -qE "\s+chkdeps"
if [[ "$?" -eq "0" ]]; then
	echo "cli chkdeps command is enabled!"
	STATUS=1
fi
paperwork-gtk --help | grep -qE "^\s+chkdeps"
if [[ "$?" -eq "0" ]]; then
	echo "gtk chkdeps command is enabled!"
	STATUS=1
fi

# check that command install is not available
paperwork-gtk --help | grep -qE "^\s+install"
if [[ "$?" -eq "0" ]]; then
	echo "gtk install command is enabled!"
	STATUS=1
fi

exit $STATUS
