diff --git a/tools/devshell/get-device b/tools/devshell/get-device new file mode 100755 index 0000000000000000000000000000000000000000..b23062740333852f46838bb018c6307e9a1805c8 --- /dev/null +++ b/tools/devshell/get-device @@ -0,0 +1,10 @@ +#!/bin/bash +# Copyright 2019 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +### print the current selected device name + +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? + +get-device-name diff --git a/tools/devshell/get-device-addr b/tools/devshell/get-device-addr new file mode 100755 index 0000000000000000000000000000000000000000..b7dc2c859852996c17fa8a9207349620c078cc3e --- /dev/null +++ b/tools/devshell/get-device-addr @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright 2019 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +### print the Fuchsia IPv6 address of the current selected device + +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? +fx-config-read + +get-fuchsia-device-addr diff --git a/tools/devshell/scp b/tools/devshell/scp index b86dbfb21a261e52ec42afdbbad0ba34c8ef16fd..d82f51cec8ee922eb5dc4572747df4836dd87d83 100755 --- a/tools/devshell/scp +++ b/tools/devshell/scp @@ -12,7 +12,7 @@ ## ## Example usage: ## -## fx scp "[$(fx netaddr --fuchsia)]:source_file" dest_file +## fx scp "[$(fx get-device-addr)]:source_file" dest_file source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? fx-config-read diff --git a/tools/devshell/sftp b/tools/devshell/sftp index 4f5d956c7257af51385bfc15053a3d79d05d800e..6d3799bf29a18922aab19f76dfc8d1af4ea686e4 100755 --- a/tools/devshell/sftp +++ b/tools/devshell/sftp @@ -13,7 +13,7 @@ ## ## Example usage: ## -## fx sftp "[$(fx netaddr --fuchsia)]:source_file" dest_file +## fx sftp "[$(fx get-device-addr)]:source_file" dest_file source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? fx-config-read