Skip to content

Commit

Permalink
Add --ssh examle into README.md and make help description better
Browse files Browse the repository at this point in the history
  • Loading branch information
jezek authored and mardy committed Jan 22, 2022
1 parent 3753c98 commit 9122680
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,35 @@ Crossbuilder aims at making cross compiling code and deploying projects to devic
Initially developed in: https://launchpad.net/crossbuilder

To use it, clone the repository and just run it from there:

cd crossbuilder
./crossbuilder help
```bash
cd crossbuilder
./crossbuilder help
```

To build and deploy your project on the device connected to your computer all in one go:

cd yourproject/
crossbuilder
```bash
cd yourproject/
crossbuilder
```

Change a line of code and type crossbuilder again to re-build and re-deploy.

To go even faster, bypass building Debian packages with:

crossbuilder --no-deb
```bash
crossbuilder --no-deb
```

For an even faster LXD setup, resetup LXD using ZFS:

crossbuilder setup-lxd
```bash
crossbuilder setup-lxd
```

To enter the LXD container used to build:

crossbuilder shell
```bash
crossbuilder shell
```

To use ssh instead of adb to deploy, use the ```--ssh``` option. If your device has ssh enabled on address let's say 192.168.0.5, use:
```bash
crossbuilder [email protected]
```
8 changes: 4 additions & 4 deletions crossbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ display_help () {
echo " --lxd-image - LXD image to use [defaults to the ones provided by the Ubuntu SDK (example: ubuntu-sdk-16.04-amd64-armhf-dev)."
echo " --privileged - Use a privileged container (disabled by default)."
echo " --ephemeral - Build using a short-lived container (disabled by default)."
echo " --ssh - Use ssh with provided address instead of adb to deploy to device."
echo " --password - User password of the device to deploy to [defaults to 0000]."
echo " --no-deb - Do not build Debian packages and uses rsync to deploy the build artifacts."
echo " --deploy-path - When deploying with --no-deb (rsync), installation path for the build artifacts [defaults to /]."
echo " --parallel - Set parallelism of the build. Defaults to the number of logical core + 1."
echo " --ssh - Use ssh with provided address instead of adb."
}


Expand Down Expand Up @@ -974,6 +974,9 @@ while [ "$1" != "" ]; do
--lxd-image)
LXD_IMAGE=$VALUE
;;
--ssh)
SSH_ADDRESS=$VALUE
;;
--password)
DEVICE_PASSWORD=$VALUE
;;
Expand All @@ -993,9 +996,6 @@ while [ "$1" != "" ]; do
--parallel)
PARALLEL_BUILD=$VALUE
;;
--ssh)
SSH_ADDRESS=$VALUE
;;
--help)
display_help
exit 0
Expand Down

0 comments on commit 9122680

Please sign in to comment.