                                                                     
                                                                     
                                                                     
                                             
@echo off
title DigitalDomination gametype installer v0.1
cls
:home
echo.
echo =============
echo This utility installs maps for compatible game types.
echo What kind of action do you want to do?:
echo.
echo 1) install all gametypes
echo 2) exit
echo 3) Secret!
echo.
set /p choice=Type option:
echo =============
call:menu_%choice%
goto home

::-----------------------------------------------------------
:: menu functions follow below here
::-----------------------------------------------------------

:menu_1
echo Converting map to standard gametypes
::call:myCopy <old name> <new name>
call:myCopy maps\CTF-BCE_DigitalDomV1.unr maps\DOM-BCE_DigitalDomV1.unr
call:myCopy maps\CTF-BCE_DigitalDomV1.unr maps\DM-BCE_DigitalDomV1.unr
echo done
goto:eof

:menu_2
echo K THX BYE!
Exit
goto:eof

:menu_3
echo Psssst, keep this secret! https://www.youtube.com/watch?v=dQw4w9WgXcQ&
goto:eof

::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------

:myRemove
if exist %~1 (
	if exist %~2 (
		echo - "%~2" is a new version of "%~1".
		echo   Removing "%~1"
		del %~1
	) else (
		echo - warning: "%~1" is deprecated.
		echo   Please install the new version "%~2"
	)
) else (
	echo - Deletion of "%~1" already completed
)
goto:eof

:myCopy
echo - In creation of %~2

if not exist %~1 (
	echo   origin file "%~1" does not exist
	echo   Please install map "%~1"
	goto:eof
)
echo   origin file %~1 found
if exist %~2 (
	echo   convertion not neccecary, "%~2" already exists
	goto:eof
)
copy %~1 %~2
echo   Copied "%~1" to "%~2"
goto:eof
