blob: 1962eb4fb8423a71024ba843797b9f15c1be5158 [file] [log] [blame]
Sergio Slobodrian86843702017-09-05 23:22:39 -04001#!/bin/bash
Zack Williams41513bf2018-07-07 20:08:35 -07002# 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 Slobodrian86843702017-09-05 23:22:39 -040015
16pushd /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
22mv deb_files{,2}
23mkdir deb_files1
24
25# Move all no-dependency packages into the phase 1 directory
26for i in `cat sortedDebs.txt`
27do
28 mv deb_files2/$i deb_files1
29done
30
31
32# Now install the phase 1 packages
33
34sudo dpkg -R -i deb_files1 2>&1 > install.log
35sudo apt-get -f install 2>&1 >> install.log
36sudo dpkg -R -i deb_files2 2>&1 >> install.log
37sudo apt-get -f install 2>&1 >> install.log
38
39rm -f sortedDebs.txt
40
41popd
42exit 0