mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Delete sys/install-su.sh (implemented in install.sh with USE_SU=1)
This commit is contained in:
parent
d1e5b9a566
commit
eb4387c4d2
@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
MAKE=make
|
||||
gmake --help >/dev/null 2>&1
|
||||
[ $? = 0 ] && MAKE=gmake
|
||||
|
||||
${MAKE} --help 2>&1 | grep gnu > /dev/null
|
||||
if test $? != 0
|
||||
then
|
||||
echo "You need GNU Make to build me"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export MAKE="$MAKE"
|
||||
[ -z "${INSTALL_TARGET}" ] && INSTALL_TARGET=symstall
|
||||
|
||||
# find root
|
||||
cd "$(dirname "$0")" ; cd ..
|
||||
|
||||
# update
|
||||
if [ "$1" != "--without-pull" ]; then
|
||||
if [ -d .git ]; then
|
||||
git branch | grep "^\* master" > /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo "WARNING: Updating from remote repository"
|
||||
echo git pull
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export WITHOUT_PULL=1
|
||||
shift
|
||||
fi
|
||||
|
||||
# su OR sudo
|
||||
type sudo || NOSUDO=1
|
||||
|
||||
[ "$(id -u)" = 0 ] || SUDO="sudo \"${MAKE} ${INSTALL_TARGET}\""
|
||||
[ -n "${NOSUDO}" ] && SUDO='/bin/su -m root -c ${MAKE} ${INSTALL_TARGET}'
|
||||
if [ "${M32}" = 1 ]; then
|
||||
./sys/build-m32.sh $* && ${SUDO}
|
||||
elif [ "${HARDEN}" = 1 ]; then
|
||||
# shellcheck disable=SC2048
|
||||
# shellcheck disable=SC2086
|
||||
./sys/build-harden.sh $* && ${SUDO}
|
||||
else
|
||||
# shellcheck disable=SC2048
|
||||
# shellcheck disable=SC2086
|
||||
echo DUMP: ${SUDO}
|
||||
./sys/build.sh $* && ${SUDO}
|
||||
fi
|
@ -48,6 +48,10 @@ else
|
||||
[ -n "${NOSUDO}" ] && SUDO="echo NOTE: sudo not found. Please run as root: "
|
||||
fi
|
||||
|
||||
if [ "${USE_SU}" = 1 ]; then
|
||||
SUDO="/bin/su -m root -c"
|
||||
fi
|
||||
|
||||
if [ "${M32}" = 1 ]; then
|
||||
./sys/build-m32.sh $* && ${SUDO} ${MAKE} ${INSTALL_TARGET}
|
||||
elif [ "${HARDEN}" = 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user