| Index: src/scripts/common.sh
|
| diff --git a/src/scripts/common.sh b/src/scripts/common.sh
|
| index fc7a897d61346f2a40426930e6f37dba70a3b9fa..25dee4a3ed6c634b6d287689e539a83ea97db76a 100644
|
| --- a/src/scripts/common.sh
|
| +++ b/src/scripts/common.sh
|
| @@ -171,6 +171,13 @@ function assert_outside_chroot {
|
| fi
|
| }
|
|
|
| +function assert_not_root_user {
|
| + if [ `id -u` = 0 ]; then
|
| + echo "This script must be run as a non-root user."
|
| + exit 1
|
| + fi
|
| +}
|
| +
|
| # Install a package if it's not already installed
|
| function install_if_missing {
|
| # Positional parameters from calling script. :? means "fail if unset".
|
|
|