-
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 remote-tracking branch 'origin/jm@add-bluetooth' into ledgerhq-…
…2-2-1-with-bluetooth
- Loading branch information
Showing
9 changed files
with
92 additions
and
25 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
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
root="$(git rev-parse --show-toplevel)" | ||
|
||
# Override package set by passing --arg pkgs | ||
|
||
descr=$(git describe --tags --abbrev=8 --always --long --dirty 2>/dev/null) | ||
echo >&2 "Git description: $descr" | ||
exec nix-build --no-out-link --argstr gitDescribe "$descr" "$@" ${NIX_BUILD_ARGS:-} | ||
exec nix-build "$root" --no-out-link --argstr gitDescribe "$descr" "$@" ${NIX_BUILD_ARGS:-} |
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 |
---|---|---|
@@ -1,26 +1,33 @@ | ||
#!/usr/bin/env bash | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash ./ledgerblue.nix -A shell | ||
|
||
set -Eeuo pipefail | ||
|
||
export target="${1:?Please specify target, either 's' for Nano S or 'x' for Nano X}" | ||
root="$(git rev-parse --show-toplevel)" | ||
|
||
target="${1:?Please specify target, either 's' for Nano S or 'x' for Nano X}" | ||
shift | ||
|
||
root="$(git rev-parse --show-toplevel)" | ||
export root | ||
case "$target" in | ||
s) ;; x) ;; | ||
*) | ||
>&2 echo "Target must either be 's' for Nano S or 'x' for Nano X" | ||
exit 1 | ||
esac | ||
|
||
install() { | ||
local app=$1 | ||
shift | ||
local release_file | ||
release_file=$("$root/nix/build.sh" -A "nano.${target}.release.$1") | ||
release_file=$("$root/nix/build.sh" -A "nano.$target.release.$app" "$@") | ||
bash "$root/release-installer.sh" "$release_file" | ||
} | ||
export -f install | ||
|
||
nix-shell "$root/nix/ledgerblue.nix" -A shell --run "$(cat <<EOF | ||
set -Eeuo pipefail | ||
if [ $# -eq 0 ]; then | ||
install wallet | ||
install baking | ||
install wallet "$@" | ||
install baking "$@" | ||
else | ||
install "${1:-}" | ||
app="$1" | ||
shift | ||
install "$app" "$@" | ||
fi | ||
EOF | ||
)" |
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,30 @@ | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash -p gitAndTools.hub coreutils | ||
|
||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && git rev-parse --show-toplevel)" | ||
|
||
nano_s_tarball=$("$root/nix/build.sh" -A "nano.s.release.all" "$@") | ||
nano_x_tarball=$("$root/nix/build.sh" -A "nano.x.release.all" "$@") | ||
|
||
cp -f $nano_s_tarball nano-s-release.tar.gz | ||
cp -f $nano_x_tarball nano-x-release.tar.gz | ||
|
||
# hub release create \ | ||
# -a $nano_s_tarball'#'nano-s-release.tar.gz \ | ||
# -a $nano_x_tarball'#'nano-x-release.tar.gz \ | ||
# -F - | ||
|
||
echo '## Checksums' | ||
echo '### nano-s-release.tar.gz' | ||
echo 'Type | Value' | ||
echo '-- | --' | ||
echo "MD5 | $(md5sum nano-s-release.tar.gz | cut -f1 -d' ')" | ||
echo "SHA256 | $(sha256sum nano-s-release.tar.gz | cut -f1 -d' ')" | ||
echo "SHA512 | $(sha512sum nano-s-release.tar.gz | cut -f1 -d' ')" | ||
|
||
echo '### nano-x-release.tar.gz' | ||
echo 'Type | Value' | ||
echo '-- | --' | ||
echo "MD5 | $(md5sum nano-x-release.tar.gz | cut -f1 -d' ')" | ||
echo "SHA256 | $(sha256sum nano-x-release.tar.gz | cut -f1 -d' ')" | ||
echo "SHA512 | $(sha512sum nano-x-release.tar.gz | cut -f1 -d' ')" |
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