trashernet-soc/fpga/patch_asserts.sh

15 lines
263 B
Bash
Raw Normal View History

#!/bin/bash
file="$1"
echo "Removing \$assert from $file..."
LOCS=`grep -n '$assert' "$file" | sed 's/:.*//g'`
IFS=$'\n'
for LOC in $LOCS; do
START=$(($LOC-2))
END=$(($LOC+14))
echo "Deleting lines $START -> $END"
sed -i -e "${START},${END}d" "$file"
done