Simplified the SUDO variable out, since most people shouldn't need it

This commit is contained in:
Andy Neff 2015-07-12 05:37:38 +00:00
parent cd3e92e947
commit 182ae63679
3 changed files with 4 additions and 15 deletions

2
.gitignore vendored

@ -16,5 +16,7 @@ obj-*
rpm/BUILD*
rpm/*RPMS
rpm/*.log
rpm/SOURCES
src

@ -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

@ -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