JLinkPackage.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2022 Parisi Alessandro
  4. # This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
  5. #
  6. # MaterialFX is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # MaterialFX is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Lesser General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Lesser General Public License
  17. # along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. # This only works on Linux and specifically my system since tar2zip is a npm module I installed to convert the tar archive
  20. # to zip easily.
  21. # I was tired of Gradle shit and also tired of learning about boring Linux commands stuff (the tar command is quantum physic
  22. # and the zip command on the other hand is very limited) so this is the quickest solution I came up with
  23. BASE_DIR=$1
  24. IMG_DIR="${BASE_DIR}/image"
  25. OUT_DIR="${BASE_DIR}/distributions"
  26. tar -C "${IMG_DIR}/MaterialFX Demo-linux-x64" --transform 'flags=r;s|.|MFXDemo_Linux|' -c . | xz -4 > "${OUT_DIR}/materialfx_demo_linux64.tar.xz"
  27. tar -C "${IMG_DIR}/MaterialFX Demo-mac" --transform 'flags=r;s|.|MFXDemo_Mac|' -c . | xz -4 > "${OUT_DIR}/materialfx_demo_mac64.tar.xz"
  28. tar -C "${IMG_DIR}/MaterialFX Demo-win" --transform 'flags=r;s|.|MFXDemo_Win|' -c . | tar2zip > "${OUT_DIR}/materialfx_demo_win64.zip"