12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #!/bin/sh
- # This file is part of UPM.
- # Copyright (c) 2016 ali abdul ghani <blade.vp2020@gmail.com>
- # UPM is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- # UPM is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with UPM. If not, see <http://www.gnu.org/licenses/>.
- if test $# = 0
- then
- echo E: Invalid operation
- exit
- fi
- if echo "$1" | grep -q "tar.bz2"; then
- tar -xvjf $1
- re=${1%????????}
- else
- tar -xvzf $1
- re=${1%???????}
- fi
- fdir=($pwd)
- cd $re
- e=${re:0:5}
- if echo "$1" | grep -q "linux"; then
- make olddefconfig
- make
- sudo make modules_install install
- else
- chmod +x configure
- sudo ./configure
- make
- sudo make install
- fi
- cd $fdir
- rm -R $re
|