Advertisement
Guest User

Untitled

a guest
May 20th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. cls
  3. SET /a error=0
  4. SET /a nofile=1
  5. echo   ####################################################
  6. echo   #============== Trinity Auto Updater ==============#
  7. echo   ####################################################
  8. echo.
  9. echo Melyik adatbazisba szeretnel frissiteseket inportalni?
  10. echo Lehetosegek: world, characters, realmd
  11. :dbnev
  12. echo.
  13. SET /p type=DB nev:
  14. if %type%==world SET db=*world*.sql
  15. if %type%==characters SET db=*characters*.sql
  16. if %type%==realmd SET db=*realmd*.sql
  17. for %%a in (%db%) do (
  18.    SET /a nofile=0
  19.    echo %%a -- INPORTALASA FOLYAMATBAN!
  20.    mysql --user=root --password=rootadmin "%type%" < %%a
  21.    if errorlevel 1 (
  22.       echo.
  23.       echo %%a -- SIKERTELEN!
  24.       echo.
  25.       SET /a error=error+1
  26.    )else (
  27.       echo %%a -- SIKERES!
  28.       echo.
  29.    )
  30. )
  31. echo.
  32. echo.
  33. if %nofile%==1 (
  34.    echo Nincs inportalhato sql file
  35.    goto dbnev
  36. )
  37. if %error% == 0 (
  38.    echo Az osszes muvelet sikeresen vegrehajtva
  39.    echo.
  40. )else (
  41.    echo Nem sikerult minden muveletet vegrehajtani.
  42.    echo HIBAK SZAMA: %error%
  43.    echo.
  44. )
  45. pause
  46. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement