#! /bin/sh

set -e

PWD_UID=$(stat . --printf="%u")

if [ "${PWD_UID}" -ne "0" ]; then
  getent passwd ${PWD_UID} || useradd -u ${PWD_UID} inpnet
  exec sudo -HEu inpnet -- $@
else
  $@
fi
