1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/bin/bash
- while read line; do
- if ! echo "$line" | grep -q "undefined reference to \`.*'$"
- then
-
- continue
- fi
- symbol=`echo "$line" | sed -e "s/.*undefined reference to .\(.*\)'$/\1/"`
-
- filename=`echo "$symbol" | perl -pe "s#.*?igl::([A-z0-9_]*).*$'$'#\1#"`
-
- cpp="$filename.cpp"
-
- if [ ! -e "$cpp" ]
- then
- echo "Warning: $cpp does not exist, skipping ..."
- continue
- fi
- if ! grep -q "^\/\/ Explicit template specialization*$" "$cpp"
- then
- echo "Warning: skipping $cpp because it does not match ^\/\/ Explicit template specialization*$ "
- continue;
- fi
- before=`sed '/^\/\/ Explicit template specialization$/q' "$cpp"`;
-
- after=`sed '1,/^\/\/ Explicit template specialization$/d' $cpp`;
-
- explicit="template $symbol;"
-
- if grep -F "$explicit" "$cpp"
- then
- echo "Error: $cpp already contains $explicit"
- echo " Recompile igl static lib, recompile your project, and try again."
- continue
- fi
-
-
-
-
- done
|