make messages more consistent
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-convert-nex2xon.sh
index 68f0bfc3941e8ad8e902f69490f9b8e27d68c524..b8136ca562ffef32aff35214361c1216b7f631a9 100755 (executable)
@@ -1,10 +1,11 @@
-f=$1
+sed=""
 map()
 {
-       from=$1
-       to=$2
-       # rawfile=$3
-       sed -i "s,\\<${from#textures/}\\>,\\<${to#textures/}\\>,g" "$f"
+       rawfile=$1
+       from=$2
+       to=$3
+       sed="$sed""s,\<${from#textures/}\>,${to#textures/},;"
+       sed="$sed""s,\<${rawfile#textures/}\>,${to#textures/},;" # fix messup
 }
 map textures/exx/base/base_crete01 textures/eX/eX_cretebase_01 textures/exx/base-crete01
 map textures/exx/base/base_crete02 textures/eX/eX_cretebase_02 textures/exx/base-crete02
@@ -309,3 +310,5 @@ map textures/trak5x/wall/wall_wall5d textures/trak5/wall5d textures/trak5x/wall-
 map textures/trak5x/wall/wall_wall5e textures/trak5/wall5e textures/trak5x/wall-wall5e
 map textures/trak5x/wall/wall_wall6a textures/trak5/wall6a textures/trak5x/wall-wall6a
 map textures/trak5x/wall/wall_wall7a textures/trak5/wall7a textures/trak5x/wall-wall7a
+
+sed -i -e "$sed" "$1"