Commit 2f4ea897 authored by Ralf Stemmer's avatar Ralf Stemmer

Exit when user is root

parent 345f1b34
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Version: 0.2.0 - Alpha # Version: 0.2.0 - Alpha
# #
# Changelog: # Changelog:
# 0.2.1 - 21.03.19: Exit if user is root
# 0.2.0 - 07.03.19: Build ARM Cortex-A9 Cross Compiler # 0.2.0 - 07.03.19: Build ARM Cortex-A9 Cross Compiler
# 0.1.0 - 06.03.19: Build MicroBlaze Cross Compiler # 0.1.0 - 06.03.19: Build MicroBlaze Cross Compiler
# #
...@@ -28,6 +29,10 @@ NEWLIB_VERSION="3.1.0" ...@@ -28,6 +29,10 @@ NEWLIB_VERSION="3.1.0"
#chown -R ralf:ralf /opt/mbxc #chown -R ralf:ralf /opt/mbxc
#exit #exit
# TODO: Check permissions - no run for root # TODO: Check permissions - no run for root
if [ "$(id -u)" == 0 ] ; then
echo -e "\e[1;31mThis script shall not be executed with root permissions!\e[0m"
exit 1
fi
# Create temporary director for building the compiler # Create temporary director for building the compiler
mkdir -p $TMPDIR mkdir -p $TMPDIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment