2019-09-12 13:42:04 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-06-12 15:32:07 +00:00
|
|
|
set -e
|
|
|
|
|
2019-08-16 13:29:21 +00:00
|
|
|
SITE="https://firmware.corp.sldev.cz/upgrade_tests/"
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
# download all emulators without index files, without directories and only if not present
|
2020-06-12 15:32:43 +00:00
|
|
|
wget --no-check-certificate -e robots=off --no-verbose --no-clobber --no-parent --cut-dirs=2 --no-host-directories --recursive --reject "index.html*" -P emulators/ $SITE
|
2019-08-16 13:29:21 +00:00
|
|
|
|
|
|
|
chmod u+x emulators/trezor-emu-*
|
2019-10-22 08:54:18 +00:00
|
|
|
|
|
|
|
if [ -f /etc/NIXOS ]; then
|
2020-06-19 07:12:08 +00:00
|
|
|
# for this to work you need to run ./download_emulators.sh outside the main nix shell
|
2019-10-22 08:54:18 +00:00
|
|
|
cd emulators && nix-shell --run "autoPatchelf trezor-emu*"
|
|
|
|
fi
|