forked from baskerville/plato
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script for generating *standalone* packages
- Loading branch information
1 parent
96f7e01
commit ff82f58
Showing
5 changed files
with
56 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
/dictionaries | ||
/src/mupdf_wrapper/*/ | ||
/dist | ||
/standalone | ||
/plato-*.zip | ||
/thirdparty/*/* | ||
!/thirdparty/*/*kobo* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
menu_item :main :Reboot in Plato :cmd_output :200:quiet:touch /usr/local/Plato/bootlock | ||
chain_success :power :reboot | ||
menu_item :main :Start Plato :cmd_spawn :quiet:/usr/local/Plato/plato.sh | ||
menu_item :main :Copy Logs :cmd_spawn :quiet:cp /usr/local/Plato/*.log /mnt/onboard/.adds/plato |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#! /bin/sh | ||
|
||
if [ "$#" -lt 2 ] ; then | ||
printf "Usage: %s FIRMWARE_ARCHIVE NICKEL_MENU_ARCHIVE\n" "${0##*/}" >&2 | ||
exit 1 | ||
fi | ||
|
||
[ -d dist ] || ./dist.sh | ||
[ -d standalone ] && rm -Rf standalone | ||
|
||
FIRMWARE_ARCHIVE=$1 | ||
NICKEL_MENU_ARCHIVE=$2 | ||
|
||
mkdir standalone | ||
cd standalone || exit 1 | ||
|
||
unzip "$FIRMWARE_ARCHIVE" KoboRoot.tgz | ||
tar -xzvf KoboRoot.tgz etc/init.d/rcS | ||
patch -p 1 < ../contrib/firmware.patch || exit 1 | ||
rm KoboRoot.tgz | ||
|
||
unzip "$NICKEL_MENU_ARCHIVE" KoboRoot.tgz | ||
tar -xzvf KoboRoot.tgz | ||
rm KoboRoot.tgz | ||
mv mnt/onboard/.adds . | ||
rm -Rf mnt | ||
|
||
mkdir -p usr/local | ||
mkdir -p .adds/plato | ||
|
||
mv ../dist usr/local/Plato | ||
for name in bin css dictionaries hyphenation-patterns keyboard-layouts ; do | ||
mv usr/local/Plato/"$name" .adds/plato | ||
ln -s /mnt/onboard/.adds/plato/"$name" usr/local/Plato | ||
done | ||
|
||
ln -s /mnt/onboard/.adds/plato/Settings.toml usr/local/Plato/Settings.toml | ||
cp ../contrib/NickelMenu/plato .adds/nm | ||
|
||
mkdir .kobo | ||
tar -czvf .kobo/KoboRoot.tgz etc usr | ||
rm -Rf etc usr | ||
|
||
FIRMWARE_VERSION=$(basename "$FIRMWARE_ARCHIVE" .zip) | ||
FIRMWARE_VERSION=${FIRMWARE_VERSION##*-} | ||
PLATO_VERSION=$(cargo pkgid | cut -d '#' -f 2) | ||
|
||
zip -r plato-standalone-"$PLATO_VERSION"-fw_"$FIRMWARE_VERSION".zip .adds .kobo | ||
rm -Rf .adds .kobo |