forked from nbrooks211/zombietextures
42 lines
872 B
Bash
42 lines
872 B
Bash
#!/bin/bash
|
|
|
|
# Get the current user. This assumes you are running the script as the desired user.
|
|
USER=$(whoami)
|
|
|
|
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
|
|
|
|
#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
|
|
|