You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
945 B

4 years ago
  1. #!/bin/bash
  2. # Construct the ACS source from the original file.
  3. cd build_files
  4. cat ../src/acs_source/ZMEMORY.acs | ../meta_src/metatool.out ZMEMORY.acs ZMEMORY_g.acs ZMEMORY_w.acs ../acs_interface/ZMEMORY.acs ../acs_interface/ZMEMORY_g.acs ../acs_interface/ZMEMORY_w.acs
  5. # compile the ACS source
  6. acc -i $ACC_ZCOMMON_PATH ZMEMORY.acs ../src/acs/ZMEMORY.o
  7. cd ../src
  8. # Bundle everything that isn't:
  9. # .sh : a shell script.
  10. thin_arg=$1
  11. version=$(cat ../version.txt)
  12. if [[ $thin_arg == "thin" ]]; then
  13. 7za a -tzip ../ZMemory_v$version\_thin.pk3 -r -x\!*.sh -x\!acs/.gitignore -xr\!acs_source
  14. else
  15. 7za a -tzip ../ZMemory_v$version.pk3 -r -x\!*.sh -x\!acs/.gitignore
  16. fi
  17. cd ../acs_interface
  18. # This is some weird derpiness.
  19. # The files are however small, so it isn't a big deal.
  20. echo "" >> ZMEMORY.acs #newline
  21. cat ZMEMORY_g.acs >> ZMEMORY.acs
  22. echo "" >> ZMEMORY.acs #newline
  23. cat ZMEMORY_w.acs >> ZMEMORY.acs
  24. rm ZMEMORY_g.acs
  25. rm ZMEMORY_w.acs