From 182ae63679ec73ac21ead6b587199b218f0c3f68 Mon Sep 17 00:00:00 2001 From: Andy Neff Date: Sun, 12 Jul 2015 05:37:38 +0000 Subject: [PATCH] Simplified the SUDO variable out, since most people shouldn't need it --- .gitignore | 2 ++ rpm/INSTALL.md | 15 +-------------- rpm/build_rpms.bsh | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 7099817b..b32d4315 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,7 @@ obj-* rpm/BUILD* rpm/*RPMS +rpm/*.log +rpm/SOURCES src diff --git a/rpm/INSTALL.md b/rpm/INSTALL.md index cbd3752f..66cb05df 100644 --- a/rpm/INSTALL.md +++ b/rpm/INSTALL.md @@ -26,20 +26,7 @@ different versions. Practice is to run rpmbuild as non-root user. This prevents inadvertently installing files in the operating system. The intent is to run build_rpms.bsh as a non-root user with sudo privileges. If you have a different command for -sudo, or do not have sudo installed (which is possible, but unlikely), you can -set the SUDO environment variable to nothing or another command and you can -run as root if that is your style. Example: - -``` -./clean.bsh -SUDO=echo ./build_rpms.bsh - or -(as root) SUDO= ./build_rpms.bsh -``` - -(The echo example will let you know what yum commands you need to run to make -the build work in case you care. Most of people will just run -```./build_rpms.bsh``` and be done.) +sudo, set the SUDO environment variable to the other command. When all is down, install (or distribute) RPMS/git-lfs.rpm diff --git a/rpm/build_rpms.bsh b/rpm/build_rpms.bsh index 10747d43..0e421188 100755 --- a/rpm/build_rpms.bsh +++ b/rpm/build_rpms.bsh @@ -11,7 +11,7 @@ else RPMBUILD=(rpmbuild --define "_topdir ${CURDIR}" --nodeps) fi LOG=${CURDIR}/build.log -SUDO=${SUDO=sudo} +SUDO=${SUDO=`if which sudo > /dev/null 2>&1; then echo sudo; fi`} export PATH=${PATH}:/usr/local/bin exec 6>&1