summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-02-04 15:43:20 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-02-04 15:43:20 -0500
commitebb4ff3ebc39d202da85be8da9dc3402c58a587b (patch)
tree8b5c35bf33005e7d75d779b2d05777e9dbac5e5b
parent1fe666d52dd2d2318d2a79ffce9cff47f9b34e3c (diff)
Added module installer script.HEADmaster
-rwxr-xr-xarm-install-modules.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/arm-install-modules.sh b/arm-install-modules.sh
new file mode 100755
index 0000000..b5f7b63
--- /dev/null
+++ b/arm-install-modules.sh
@@ -0,0 +1,31 @@
1#!/bin/sh
2
3set -e
4set -u
5
6MOD_ROOT="/home/$USER/modules"
7RELEASE_FILE="include/config/kernel.release"
8
9error() {
10 echo "$@" >&2
11 exit 1
12}
13
14set +e
15VERSION=$(cat $RELEASE_FILE)
16set -e
17if [ "x" = "x$VERSION" ] ; then
18 error "Could not determine version."
19fi
20
21MOD_DIR="$MOD_ROOT/$VERSION"
22
23if [ -d "$MOD_DIR" ] ; then
24 rm -rf "$MOD_DIR"
25fi
26
27if [ ! -d "$MOD_DIR" ] ; then
28 mkdir -p "$MOD_DIR"
29fi
30
31make modules_install INSTALL_MOD_PATH=$MOD_DIR