Adds warning not to build as root, otherwise the RVM installer will place two files...
authorChristoph Dwertmann <christoph.dwertmann@nicta.com.au>
Fri, 7 Jun 2013 09:00:35 +0000 (19:00 +1000)
committerChristoph Dwertmann <christoph.dwertmann@nicta.com.au>
Fri, 7 Jun 2013 09:00:35 +0000 (19:00 +1000)
README
rpm/create_rpm_from_here

diff --git a/README b/README
index 5c19ee3..be24f78 100644 (file)
--- 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
 
index a6dfd59..a5a7c92 100755 (executable)
@@ -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