projects
/
bbb-usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84d236f
)
install.sh: add overwrite safeguard + overwrite flag
author
kremlin
<ian@kremlin.cc>
Sat, 11 Feb 2017 05:06:03 +0000
(23:06 -0600)
committer
kremlin
<ian@kremlin.cc>
Sat, 11 Feb 2017 05:06:03 +0000
(23:06 -0600)
misc/install.sh
patch
|
blob
|
blame
|
history
diff --git
a/misc/install.sh
b/misc/install.sh
index 859f38ed398dba97144c9b16596d8ee3eb926ad2..a36aecb9e260b46346f06b75368ba25b2dcb1bec 100755
(executable)
--- 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