Advertisement
krock186

[AoE2] Wine voobly terrain slp patcher

Jun 1st, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/bash
  2. # Created by Krock <mk939@ymail.com>
  3. # License: CC-BY 3.0, Revision: 180601 13:51
  4.  
  5. #  Files & Requirements
  6. # ======================
  7. # ./convert_terrain.sh (this file)
  8. # ./drsbuild.exe
  9. #   * From: http://artho.com/age/files/drs.html
  10. # ./vooblyslpdecode.exe
  11. #   * From: https://github.com/skeletonmage/vooblyslpdecode
  12. # ./input/
  13. # ./input/terrain.drs
  14. #   * File to modify. Create backups first.
  15. # ./input/12345.slp
  16. #   * slp file(s) to patch into terrain.drs
  17.  
  18. cd input
  19.  
  20. if [ ! -f terrain.drs ]; then
  21.     echo "input/terrain.drs not found!"
  22.     exit
  23. fi
  24.  
  25. for f in *.slp; do
  26.     echo "Converting $f"
  27.     wine ../vooblyslpdecode.exe "$f" "ter$f"
  28.     if [[ $? -ne 0 ]]; then
  29.         cp "$f" "ter$f"
  30.     fi
  31. done
  32.  
  33. if [[ $? -ne 0 ]]; then
  34.     echo "Something went wrong"
  35.     exit $?
  36. fi
  37.  
  38. wine ../drsbuild.exe /r terrain.drs ter*.slp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement