X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=misc%2Finstall.sh;h=a36aecb9e260b46346f06b75368ba25b2dcb1bec;hb=9ad7f01e6dc779d59b6b39431f194f2d34e455d4;hp=859f38ed398dba97144c9b16596d8ee3eb926ad2;hpb=20de44d9f2988dcaa50b7575f76aa15cc4201da0;p=bbb-usb.git diff --git a/misc/install.sh b/misc/install.sh index 859f38e..a36aecb 100755 --- a/misc/install.sh +++ b/misc/install.sh @@ -1,4 +1,20 @@ #!/bin/ksh +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