1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

show usage if run outside of extfs context

This commit is contained in:
Pavol Rusnak 2016-06-01 14:05:53 +02:00
parent 6696dcb985
commit f2c35e9d13
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -4,7 +4,7 @@ from __future__ import print_function
''' '''
Use TREZOR as a hardware key for opening EncFS filesystem! Use TREZOR as a hardware key for opening EncFS filesystem!
Demo usage: Usage:
encfs --standard --extpass=./encfs_aes_getpass.py ~/.crypt ~/crypt encfs --standard --extpass=./encfs_aes_getpass.py ~/.crypt ~/crypt
''' '''
@ -72,6 +72,12 @@ def choose_device(devices):
raise Exception("Invalid choice, exiting...") raise Exception("Invalid choice, exiting...")
def main(): def main():
if not 'encfs_root' in os.environ:
sys.stderr.write('\nThis is not a standalone script and is not meant to be run independently.\n')
sys.stderr.write('\nUsage: encfs --standard --extpass=./encfs_aes_getpass.py ~/.crypt ~/crypt\n')
sys.exit(1)
devices = wait_for_devices() devices = wait_for_devices()
transport = choose_device(devices) transport = choose_device(devices)
client = TrezorClient(transport) client = TrezorClient(transport)