From: Christoph Dwertmann Date: Fri, 7 Jun 2013 09:00:35 +0000 (+1000) Subject: Adds warning not to build as root, otherwise the RVM installer will place two files... X-Git-Url: http://git.onelab.eu/?p=rvm-ruby.git;a=commitdiff_plain;h=896c9ceb5d3891bd176d825c8abb83a9f8b86f6e Adds warning not to build as root, otherwise the RVM installer will place two files in /etc --- diff --git a/README b/README index 5c19ee3..be24f78 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ This is basically a .spec file which builds and packages RVM and selected Rubies & Gems into a RPM. RVM is installed system-wide for all users and is ready to use immediately, with no compilation needed on the target machine. -Just clone this repo, customize the rubies and gems needed as indicated below and launch: +Just clone this repo, customize the rubies and gems needed as indicated below and run (as user, not root!): ./rpm/create_rpm_from_here diff --git a/rpm/create_rpm_from_here b/rpm/create_rpm_from_here index a6dfd59..a5a7c92 100755 --- a/rpm/create_rpm_from_here +++ b/rpm/create_rpm_from_here @@ -3,6 +3,11 @@ # This script will build a RPM from the files in the current directory, given that there is a rpm/file.spec # Its primary purpose is to be used by Jenkins +if [ $UID == 0 ]; then + echo "Please do not build RPM packages as root" + exit 1 +fi + set -e set -x