mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 02:23:58 +00:00
Massage sys/install.sh for Haiku-x86
This commit is contained in:
parent
aa7e1b29be
commit
580ab3ff50
@ -1,10 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
echo "[WW] Do not run this script as root!"
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
echo "[--] Downgrading credentials to ${SUDO_USER}"
|
||||
exec sudo -u "${SUDO_USER}" sys/install.sh $*
|
||||
if [ "$(uname)" = "Haiku" ]; then
|
||||
gcc-x86 --version > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
export CC=gcc-x86
|
||||
export HOST_CC=gcc-x86
|
||||
else
|
||||
echo "If compilation fails, install gcc-x86 from depot"
|
||||
fi
|
||||
export PREFIX=/system
|
||||
else
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
echo "[WW] Do not run this script as root!"
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
echo "[--] Downgrading credentials to ${SUDO_USER}"
|
||||
exec sudo -u "${SUDO_USER}" sys/install.sh $*
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user