aboutsummaryrefslogtreecommitdiffstats
path: root/install_modules.sh
diff options
context:
space:
mode:
authorroot <root@artemis.panaceas.org>2015-12-25 04:40:36 +0000
committerroot <root@artemis.panaceas.org>2015-12-25 04:40:36 +0000
commit849369d6c66d3054688672f97d31fceb8e8230fb (patch)
tree6135abc790ca67dedbe07c39806591e70eda81ce /install_modules.sh
downloadlinux-3.0.35-kobo-849369d6c66d3054688672f97d31fceb8e8230fb.tar.gz
linux-3.0.35-kobo-849369d6c66d3054688672f97d31fceb8e8230fb.tar.bz2
linux-3.0.35-kobo-849369d6c66d3054688672f97d31fceb8e8230fb.zip
initial_commit
Diffstat (limited to 'install_modules.sh')
-rwxr-xr-xinstall_modules.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/install_modules.sh b/install_modules.sh
new file mode 100755
index 00000000..9e9ec973
--- /dev/null
+++ b/install_modules.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+
+WORK_DIR="$(pwd)"
+MOD_DIR="${WORK_DIR}/_root_modules"
+OUT_MOD_DIR="${WORK_DIR}/root_modules"
+if [ ! -d "${MOD_DIR}" ];then
+ mkdir -p "${MOD_DIR}"
+fi
+INSTALL_MOD_PATH_OPT="INSTALL_MOD_PATH=${MOD_DIR}"
+make ${INSTALL_MOD_PATH_OPT} modules_install
+
+if [ -d "${OUT_MOD_DIR}" ];then
+ pushd "${OUT_MOD_DIR}"
+
+ find -type f |grep -v \.svn |
+ while read fname
+ do
+ rm "${fname}"
+ done
+
+ popd
+
+ pushd "${MOD_DIR}"
+ cp -a * "${OUT_MOD_DIR}/"
+ popd
+
+ rm -fr "${MOD_DIR}"
+else
+ mv "${MOD_DIR}" "${OUT_MOD_DIR}"
+fi
+
+exit 0
+