#!/bin/ash
#191219 zygo reported Utility -> Gexec -> mtpaint, tick "run as root", error 'gksu' missing.

#this script is a bad hack...

#remove options...
CMDOPTS="$(echo "$@" | tr -s ' ' | tr ' ' '\n' | grep -v '^\-' | tr '\n' ' ')"

#this will run 'askpass' gui...
[ "`whoami`" != "root" ] && exec sudo -A ${0} ${CMDOPTS}

exec ${CMDOPTS}
###end###
