zombietextures/build.sh

43 lines
872 B
Bash
Raw Normal View History

#!/bin/bash
# Get the current user. This assumes you are running the script as the desired user.
USER=$(whoami)
2023-09-28 16:31:21 -04:00
name=fmlmap
mapname=${name}.map
bspname=${name}.bsp
echo $mapname
echo $bspname
#build the image
python timeatbuild.py
#move the build image
mv overlay_datetime_image.png textures/zombietextures_dev/overlay_datetime_image.png
2023-09-28 16:31:21 -04:00
#build the map
q3map2 -meta -patchmeta $mapname
q3map2 -convert -format obj $bspname
#move the map
mv "${mapname%.*}.obj" maps/
mv "${mapname%.*}.mtl" maps/
# Define the destination directory
DEST_DIR="/home/$USER/.xonotic/data/"
# Delete and copy zombietextures.pk3dir
if [ -d "../assets" ]; then
if [ -d "${DEST_DIR}zombietextures.pk3dir" ]; then
rm -r "${DEST_DIR}zombietextures.pk3dir"
fi
cp -r ../assets ${DEST_DIR}zombietextures.pk3dir
else
echo "Folder zombietextures.pk3dir not found!"
fi