Fix scripts and tests

* Fix the reformat script to work with recent changes
* Fix the convert-nei-dump script to remove leading and trailing '_'
* Fix various broken tests
This commit is contained in:
Andrew Miner
2015-01-21 15:05:19 -08:00
parent 3edba072d0
commit e612cedf8d
10 changed files with 46 additions and 31 deletions
+7 -1
View File
@@ -38,7 +38,13 @@ echo "" >> $DATA_FILE
mkdir -p $TARGET_DIR/images
ls $SOURCE_DIR/itempanel_icons | while read FILE; do
ITEM_NAME="$(echo $FILE | sed 's/.png//')"
TARGET_FILE="$(echo $ITEM_NAME | sed 's/[^a-zA-Z0-9]/_/g' | sed 's/__*/_/g' | tr '[A-Z]' '[a-z]').png"
TARGET_FILE="$(echo $ITEM_NAME \
| sed 's/[^a-zA-Z0-9]/_/g' \
| sed 's/__*/_/g' \
| sed 's/^_//' \
| sed 's/_$//' \
| tr '[A-Z]' '[a-z]' \
).png"
cp "$SOURCE_DIR/itempanel_icons/$FILE" "$TARGET_DIR/images/$TARGET_FILE"
echo "item: $ITEM_NAME" >> $DATA_FILE
echo "" >> $DATA_FILE