source: ProjectBuilder/devel/pb/contrib/installqemu @ 262

Last change on this file since 262 was 262, checked in by Bruno Cornec, 13 years ago

Fix bug #7 where .pbrc nearly empty wasn't working

  • Property svn:executable set to *
File size: 800 bytes
Line 
1#!/bin/bash
2
3(
4export PBPROJ=pb
5export PBROOT=/users/bruno/pb/svn/0.8.8
6
7if [ _"$1" == _"" ]; then
8    echo "Syntax: installqemu VM|all"
9    exit -1
10fi
11if [ _"$1" == _"all" ]; then
12    opt="`grep vmlist  $PBROOT/pbconf/$PBPROJ.pb | grep $PBPROJ | cut -d= -f2 | sed 's/,/ /g'`"
13    opt64="`echo $opt | sed 's/ /_64 /g'`"
14    opt="$opt $opt64"
15else
16    opt="`echo $* | sed 's/,/ /g'`"
17fi
18
19for m in $opt; do
20    echo "Launching script on $m"
21    pb -m $m -a root -s /users/bruno/pb/svn/0.8.8/pb/contrib/installpb script2vm
22    echo "Halting $m"
23    echo "/sbin/halt -p" > /tmp/pbscript
24    pb -m $m -a root -s /tmp/pbscript script2vm
25    sleep 120
26    job=`ps auhxww | grep qemu | grep -Ev 'grep|installqemu' | awk '{print $2}'`
27    if [ _"$job" != _"" ]; then
28        echo "Really halting $m"
29        kill $job
30    fi
31done
32) 2>&1 | tee /tmp/installqemu.log
Note: See TracBrowser for help on using the repository browser.