1*efe51d0cSJohn Levon#!/bin/bash 2*efe51d0cSJohn Levon 3*efe51d0cSJohn Levonif echo $1 | grep -q '^-p' ; then 4*efe51d0cSJohn Levon PROJ=$(echo $1 | cut -d = -f 2) 5*efe51d0cSJohn Levon shift 6*efe51d0cSJohn Levonfi 7*efe51d0cSJohn Levon 8*efe51d0cSJohn Levonbin_dir=$(dirname $0) 9*efe51d0cSJohn Levondb_file=$1 10*efe51d0cSJohn Levonif [ "$db_file" == "" ] ; then 11*efe51d0cSJohn Levon echo "usage: $0 -p=<project> <db_file>" 12*efe51d0cSJohn Levon exit 13*efe51d0cSJohn Levonfi 14*efe51d0cSJohn Levon 15*efe51d0cSJohn Levontest -e ${bin_dir}/${PROJ}.return_fixes && \ 16*efe51d0cSJohn Levoncat ${bin_dir}/${PROJ}.return_fixes | \ 17*efe51d0cSJohn Levonwhile read func old new ; do 18*efe51d0cSJohn Levon echo "update return_states set return = '$new' where function = '$func' and return = '$old';" | sqlite3 $db_file 19*efe51d0cSJohn Levondone 20*efe51d0cSJohn Levon 21