~josharenson/+junk/mir-medium-test-runner-for-jenkins

« back to all changes in this revision

Viewing changes to mir_install_packages.sh

  • Committer: chris.gagnon
  • Date: 2014-01-14 02:41:04 UTC
  • Revision ID: chris.gagnon@canonical.com-20140114024104-srftus8o81ukxsqb
refactor install depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
apt-get install mir-demo-tester
14
14
 
15
15
for DEB in `ls $HOME_DIR/archive/*.deb`; do
16
 
    deb_pack=$(dpkg -I $DEB | grep Package | cut -d " " -f 3)
17
 
    apt-get install $deb_pack -y || true
 
16
    DEPENDS=$(dpkg -I $DEB | grep Depends | cut -d ':' -f 2-)
 
17
    for DEPEND in $DEPENDS; do
 
18
        echo $DEPEND
 
19
        INSTALL=$(echo $DEPEND | grep -v ")" | grep -v "(" |grep -v "|"  | cut -d ',' -f1)
 
20
        if [ ! -z "$INSTALL" ]; then
 
21
            apt-get install $INSTALL -y || true
 
22
        fi
 
23
    done
18
24
done
19
25
 
20
26
dpkg -i --force-depends-version $HOME_DIR/archive/*.deb
21
27
 
22
28
 
23
 
 
24
29
touch /.setup_complete