Sergio Slobodrian | 8684370 | 2017-09-05 23:22:39 -0400 | [diff] [blame] | 1 | #!/bin/bash |
Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Sergio Slobodrian | 8684370 | 2017-09-05 23:22:39 -0400 | [diff] [blame] | 15 | |
| 16 | pushd /home/voltha |
| 17 | |
| 18 | # Find all non-dpendency packages |
| 19 | ./sort_packages.sh |
| 20 | |
| 21 | # Split the package lists into those that have dependencies and those that don't |
| 22 | mv deb_files{,2} |
| 23 | mkdir deb_files1 |
| 24 | |
| 25 | # Move all no-dependency packages into the phase 1 directory |
| 26 | for i in `cat sortedDebs.txt` |
| 27 | do |
| 28 | mv deb_files2/$i deb_files1 |
| 29 | done |
| 30 | |
| 31 | |
| 32 | # Now install the phase 1 packages |
| 33 | |
| 34 | sudo dpkg -R -i deb_files1 2>&1 > install.log |
| 35 | sudo apt-get -f install 2>&1 >> install.log |
| 36 | sudo dpkg -R -i deb_files2 2>&1 >> install.log |
| 37 | sudo apt-get -f install 2>&1 >> install.log |
| 38 | |
| 39 | rm -f sortedDebs.txt |
| 40 | |
| 41 | popd |
| 42 | exit 0 |