From cd5be9c4cdd6a7bd0f236707a6b5b20352fd98cc Mon Sep 17 00:00:00 2001 From: Justin-p Date: Wed, 2 Oct 2019 10:14:26 +0200 Subject: [PATCH] Add /boot. Redo help. Replaced --commit/--branch with --version. Added --url to easly switch to other fork for testing --- scripts/update_pwnagotchi.sh | 93 +++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/scripts/update_pwnagotchi.sh b/scripts/update_pwnagotchi.sh index c5cb757..6010721 100644 --- a/scripts/update_pwnagotchi.sh +++ b/scripts/update_pwnagotchi.sh @@ -1,77 +1,82 @@ #!/bin/bash # Default variables -folder="/tmp/pwnagotchi" +git_folder="/tmp/pwnagotchi" +git_url="https://github.com/evilsocket/pwnagotchi/" version="master" -commit=0 backupconfig=0 restoreconfig=0 -# functions -function display_help { - echo "Usage: $0 [-m | --master] [-c | --commit | --branch] [-bc | --backupconfig] [-rc | --restoreconfig] [-h | --help]" >&2 - echo - echo " -m, --master Update to the master branch. Used by default." - echo " -c, --commit, --branch Update to the specific commit/branch." - echo " -bc, --backupconfig Backup the current pwnagotchi config." - echo " -rc, --restoreconfig Restore the current pwnagotchi config. -bc will be enabled." - echo " -h, --help Shows this help." - echo "" - echo - exit 1 +# Functions +function usage() { + cat <