compile_game 482 B

1234567891011121314151617181920
  1. # where this engine and the project (game) is located
  2. app_loc=$1
  3. project_loc=$2
  4. # get all game files and add them to a single file
  5. files=$(ls $2/*.js)
  6. cat ${files} > $2/build/game.js
  7. # get all engine files and add them to a single file
  8. files=$(ls $1/src/*.js)
  9. cat ${files} > $2/build/engine.js
  10. # make sure build folder exists
  11. mkdir -p $2/build
  12. mkdir -p $2/images
  13. mkdir -p $2/audio
  14. # copy all engine and game files to build folder
  15. cp -r $1/index.html $2/images $2/audio $2/build