From c22b352345be5de4dff70330f5087860215f1c9c Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Wed, 11 Mar 2015 20:52:19 -0700 Subject: [PATCH] Add script to restructure mod images --- scripts/copy-to-static | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/copy-to-static diff --git a/scripts/copy-to-static b/scripts/copy-to-static new file mode 100755 index 000000000..aa416e54c --- /dev/null +++ b/scripts/copy-to-static @@ -0,0 +1,11 @@ +#!/bin/bash + +for FILE in $(ls $1/images); do + ITEM=$(basename -s .png $FILE) + MOD=$(basename $(dirname $1)) + TARGET_DIR="./static/browse/$MOD" + TARGET_FILE="./static/browse/$MOD/$ITEM/icon.png" + + mkdir -p "$TARGET_DIR" + mv "$1/$FILE" "$TARGET_FILE" +done