1#!/bin/sh 2 3INPUT_FILE=$1 4 5function fix_tr1() { 6 grep $1 $INPUT_FILE > /dev/null 2>&1 7 if [ $? -eq 0 ] ; then 8 echo "Modifying $INPUT_FILE ..." 9 sed 's/$1/$2/g' $INPUT_FILE > .tmp 10 if [ $? -ne 0 ] ; then 11 echo "sed failed!" 12 return 1 13 fi 14 mv -f .tmp $INPUT_FILE 15 fi 16 return 0 17} 18 19fix_tr1 "tr1\/unordered_map" "unordered_map" 20fix_tr1 "tr1/unordered_set" "unordered_set" 21fix_tr1 "tr1::hash" "hash" 22