18 lines
357 B
Bash
18 lines
357 B
Bash
#! /usr/bin/env bash
|
|
# Args: <repo>
|
|
|
|
if [ "`whoami`" != "root" ]
|
|
then
|
|
(>&2 echo Programm has to run as root.)
|
|
exit 1
|
|
fi
|
|
if [ -z "$SUDO_USER" ]
|
|
then
|
|
(>&2 echo Programm has to be run as sudo. SUDO_USER not set.)
|
|
exit 1
|
|
fi
|
|
|
|
CONFIG_DIR="`dirname \"$0\"`" &&
|
|
echo '' | sudo -u "$SUDO_USER" -v &&
|
|
REPO="$1" "$CONFIG_DIR/list.sh" "$CONFIG_DIR/build_in_tmp.sh"
|