From 87ba0c3217f9623202c9dd11e675a4626bdc27bf Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 16 Jul 2022 22:50:57 +0530 Subject: [PATCH] actions: Fix using custom gsync command | Avoid some log --- .github/workflows/main.yml | 8 ++++---- install.sh | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48cb96f..096fdd5 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,11 +33,11 @@ jobs: set -e sh install.sh PATH="${HOME}/.google-drive-upload/bin:${PATH}" - gupload --info && gsync --help + gupload --info && gsync --help | head -n 10 sh install.sh -U && sh install.sh --posix -B master - gupload --info && gsync --help - sh install.sh -U && sh install.sh -c custom_gupload sync="custom_gsync" - custom_gupload --info && custom_gsync --help + gupload --info && gsync --help | head -n 10 + sh install.sh -U && sh install.sh -c custom_gupload -sc custom_gsync + custom_gupload --info && custom_gsync --help | head -n 10 - name: 'Format and merge test' run: | set -e diff --git a/install.sh b/install.sh index b87cd88..cabb9c3 100644 --- a/install.sh +++ b/install.sh @@ -10,8 +10,8 @@ All flags are optional.\n Options:\n -p | --path - Custom path where you want to install script.\nDefault Path: ${HOME}/.google-drive-upload. \n -c | --cmd - Custom command name, after installation script will be available as the input argument. - To change sync command name, use %s -c gupload sync='gsync' Default upload command: gupload + -sc | --sync-cmd - Custom command name for gsync. Default sync command: gsync\n -r | --repo - Upload script from your custom repo,e.g --repo labbots/google-drive-upload, make sure your repo file structure is same as official repo.\n -R | --release - Specify tag name for the github repo, applies to custom and default repo both.\n @@ -516,6 +516,10 @@ _setup_arguments() { _check_longoptions "${1}" "${2}" COMMAND_NAME="${2}" && shift ;; + -sc | --sync-cmd) + _check_longoptions "${1}" "${2}" + SYNC_COMMAND_NAME="${2}" && shift + ;; -b | -B | --branch) _check_longoptions "${1}" "${2}" TYPE_VALUE="${2}" && shift