Sergio Slobodrian | 8684370 | 2017-09-05 23:22:39 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | pushd /home/voltha |
| 4 | |
| 5 | # Find all non-dpendency packages |
| 6 | ./sort_packages.sh |
| 7 | |
| 8 | # Split the package lists into those that have dependencies and those that don't |
| 9 | mv deb_files{,2} |
| 10 | mkdir deb_files1 |
| 11 | |
| 12 | # Move all no-dependency packages into the phase 1 directory |
| 13 | for i in `cat sortedDebs.txt` |
| 14 | do |
| 15 | mv deb_files2/$i deb_files1 |
| 16 | done |
| 17 | |
| 18 | |
| 19 | # Now install the phase 1 packages |
| 20 | |
| 21 | sudo dpkg -R -i deb_files1 2>&1 > install.log |
| 22 | sudo apt-get -f install 2>&1 >> install.log |
| 23 | sudo dpkg -R -i deb_files2 2>&1 >> install.log |
| 24 | sudo apt-get -f install 2>&1 >> install.log |
| 25 | |
| 26 | rm -f sortedDebs.txt |
| 27 | |
| 28 | popd |
| 29 | exit 0 |