Added automation OPK package

This commit is contained in:
root 2021-07-29 10:31:48 +02:00
parent 16303636f9
commit 4b0f9f88d8
3 changed files with 38 additions and 1 deletions

2
.gitignore vendored
View File

@ -9,6 +9,7 @@
*.dylib *.dylib
*.so *.so
*.a *.a
*.opk
tags tags
cscope.out cscope.out
config.mak config.mak
@ -26,7 +27,6 @@ libs/
obj/ obj/
.opk_data .opk_data
PicoDrive PicoDrive
PicoDrive.opk
pico_int_offs.h pico_int_offs.h
amalgamate amalgamate
textfilter textfilter

BIN
icons/picodrive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

37
package Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
mkdir opk/
git pull
./submodule_update.sh
cp icons/picodrive.png opk/
cp AUTHORS COPYING README opk/
cd /opt/FunKey-OS
rm -rf FunKey/output/build/picodrive-*
git pull
make
cp FunKey/output/target/usr/games/PicoDrive /opt/picodrive-irixxxx/opk
cd -
# https://unix.stackexchange.com/questions/219268/how-to-add-new-lines-when-using-echo
print()
case ${IFS- } in
(\ *) printf %b\\n "$*";;
(*) IFS=\ $IFS
printf %b\\n "$*"
IFS=${IFS#?}
esac
# Create GMenu2X entry file plus other things
print '[Desktop Entry]
Name=Mega Drive
Comment=MS/MD/MCD/32X emulator
Exec=PicoDrive %f
Icon=picodrive
Categories=emulators;
SelectorFilter=zip,md,smd,sms,32x,cue,cso,iso,chd' > opk/picodrive.funkey-s.desktop
mksquashfs opk/ picodrive_v1.98_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
rm -rf opk/