diff options
author | root <root@artemis.panaceas.org> | 2015-12-25 04:40:36 +0000 |
---|---|---|
committer | root <root@artemis.panaceas.org> | 2015-12-25 04:40:36 +0000 |
commit | 849369d6c66d3054688672f97d31fceb8e8230fb (patch) | |
tree | 6135abc790ca67dedbe07c39806591e70eda81ce /install_modules.sh | |
download | linux-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-x | install_modules.sh | 34 |
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 + |