#!/bin/bash

# Determine if gksu or kdesu will be used
if [[ `which gksu 2> /dev/null` ]]; then
        SUCOMMAND="gksu"
elif [[ `which ktsuss 2> /dev/null` ]]; then
        SUCOMMAND="ktsuss -u root"
elif [[ `which kdesu 2> /dev/null` ]]; then
        SUCOMMAND="kdesu"
else
        echo 'ERROR: gksu, ktsuss or kdesu are required for salix-update-notifier to work.' >&2
        exit 1
fi

$SUCOMMAND "$@"