diff --git a/README.md b/README.md index 443f9fe..5a32757 100644 --- a/README.md +++ b/README.md @@ -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 --ssh=phablet@192.168.0.5 +``` diff --git a/crossbuilder b/crossbuilder index 7674fac..c00dbca 100755 --- a/crossbuilder +++ b/crossbuilder @@ -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." } @@ -974,6 +974,9 @@ while [ "$1" != "" ]; do --lxd-image) LXD_IMAGE=$VALUE ;; + --ssh) + SSH_ADDRESS=$VALUE + ;; --password) DEVICE_PASSWORD=$VALUE ;; @@ -993,9 +996,6 @@ while [ "$1" != "" ]; do --parallel) PARALLEL_BUILD=$VALUE ;; - --ssh) - SSH_ADDRESS=$VALUE - ;; --help) display_help exit 0