#!/bin/bash

db="/data/data/com.marvell.factorytest/databases/testresult.db"
file="/factory/sftt.txt"
if [ -e $db ]
then
  echo "select _id,name,status from testresult;" | sqlite3 $db | sed -e 's/|0$/|fail/; s/|1$/|pass/' > $file
  chmod 644 $file
  sync
else
  exit 1
fi

