X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=misc%2Finstall.sh;h=a36aecb9e260b46346f06b75368ba25b2dcb1bec;hb=6c407e90cc0e6675dae163430aa30ff758b9ce77;hp=30764dee71e30145348d7b2218132b30e609050c;hpb=efe0ef7bfeab92bb4b5e6df74cafd09debfb145e;p=bbb-usb.git diff --git a/misc/install.sh b/misc/install.sh index 30764de..a36aecb 100755 --- a/misc/install.sh +++ b/misc/install.sh @@ -1,4 +1,20 @@ #!/bin/ksh -cd $(dirname "$0") -pwd +EUID=`id -g` +if [[ $EUID -ne 0 ]]; then + echo "run me as root!" + exit 1 +fi + +set -e + +cd $(dirname "$0")/.. +cp misc/armmake /usr/local/bin/armmake +chmod +x /usr/local/bin/armmake + +if [[ -a /sys/arch/armv7/omap/ammusb.c && $1 != "-f" ]]; then + echo "file already exists! pass -f to overwrite" + exit 1 +fi + +cp -R src/* /usr/src