package 844 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. mkdir opk/
  3. git pull
  4. ./submodule_update.sh
  5. cp icons/picodrive.png opk/
  6. cp AUTHORS COPYING README opk/
  7. cp picodrive.sh opk/
  8. cd /opt/FunKey-OS
  9. rm -rf FunKey/output/build/picodrive-*
  10. git pull
  11. make
  12. cp FunKey/output/target/usr/games/PicoDrive /opt/picodrive-funkey/opk
  13. cd -
  14. # https://unix.stackexchange.com/questions/219268/how-to-add-new-lines-when-using-echo
  15. print()
  16. case ${IFS- } in
  17. (\ *) printf %b\\n "$*";;
  18. (*) IFS=\ $IFS
  19. printf %b\\n "$*"
  20. IFS=${IFS#?}
  21. esac
  22. # Create GMenu2X entry file plus other things
  23. print '[Desktop Entry]
  24. Name=Mega Drive
  25. Comment=MS/MD/MCD/32X emulator
  26. Exec=picodrive.sh %f
  27. Icon=picodrive
  28. Categories=emulators;
  29. SelectorFilter=zip,md,smd,sms,32x,cue,cso,chd' > opk/picodrive.funkey-s.desktop
  30. mksquashfs opk/ picodrive_v1.98_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
  31. rm -rf opk/