test/RUN_ONCE_AS_SUDO_FOR_TESTS.sh
author Krista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 28 Jan 2019 13:42:25 +0100
branchsync
changeset 3244 bf242e94441c
permissions -rwxr-xr-x
src/EngineTestSuite.cc
krista@3244
     1
#!/bin/bash
krista@3244
     2
if [[ $EUID > 0 ]]
krista@3244
     3
  then echo "This script must be run with sudo."
krista@3244
     4
  exit
krista@3244
     5
fi
krista@3244
     6
krista@3244
     7
mkdir -p /run/user/$(id -u $SUDO_USER)
krista@3244
     8
chown $SUDO_USER /run/user/$(id -u $SUDO_USER)