-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from obsidiansystems/eac-install-manifest
Install with manifest
- Loading branch information
Showing
7 changed files
with
89 additions
and
59 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
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 |
---|---|---|
|
@@ -19,7 +19,6 @@ else | |
version="$3" | ||
fi | ||
|
||
|
||
set -x | ||
python -m ledgerblue.loadApp \ | ||
--appFlags 0x00 \ | ||
|
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
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,38 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
: "${1:?Please specify one or more directories or .tar.gz files; they should contain an 'app.manifest'}" | ||
|
||
for arg in "$@"; do | ||
echo | ||
|
||
app_dir="" | ||
if [ -d "$arg" ]; then | ||
app_dir="$arg" | ||
else | ||
app_dir=$(tmp_dir=$(mktemp -d) && tar xf "$arg" -C "$tmp_dir" && echo "$tmp_dir") | ||
echo "App for $arg unpacked in $app_dir" | ||
fi | ||
|
||
source "$app_dir/app.manifest" | ||
|
||
echo "Installing ${name:?manifest file is missing field}" \ | ||
"version ${version:?manifest file is missing field}" | ||
echo | ||
|
||
set -x | ||
python -m ledgerblue.loadApp \ | ||
--appFlags 0x00 \ | ||
--dataSize "${nvram_size:?manifest file is missing field}" \ | ||
--tlv \ | ||
--curve ed25519 \ | ||
--curve secp256k1 \ | ||
--curve prime256r1 \ | ||
--targetId "${target_id:?manifest file is missing field}" \ | ||
--delete \ | ||
--path 44"'"/1729"'" \ | ||
--fileName "$app_dir/app.hex" \ | ||
--appName "$name" \ | ||
--appVersion "$version" \ | ||
--icon "$(cat "$app_dir/icon.hex")" \ | ||
--targetVersion "" | ||
done |