diff --git a/scripts/aur.sh b/scripts/aur.sh index 8cc67df..c808d34 100644 --- a/scripts/aur.sh +++ b/scripts/aur.sh @@ -10,20 +10,17 @@ aur_clone="/tmp/aur-${name}" if [[ "${name}" = '' ]] then - echo 'The package name must be specified as the first argument' - exit 1 + error 'The package name must be specified as the first argument' fi if [[ "${version}" = '' ]] then - echo 'The version must be specified as the second argument' - exit 1 + error 'The version must be specified as the second argument' fi if [[ "${ssh_key}" = '' ]] then - echo 'The SSH private key must be specified as the third argument' - exit 1 + error 'The SSH private key must be specified as the third argument' fi if [[ -v CI ]] diff --git a/scripts/test.sh b/scripts/test.sh index 550cb56..cc2082f 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash set -e +source ./scripts/setup.sh name="${1}" if [[ "${name}" = '' ]] then - echo 'The package name must be specified as the first argument' - exit 1 + error 'The package name must be specified as the first argument' fi cd "${name}" diff --git a/scripts/update.sh b/scripts/update.sh index 64f8e6c..7606489 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -8,14 +8,12 @@ version="${2}" if [[ "${name}" = '' ]] then - echo 'The package name must be specified as the first argument' - exit 1 + error 'The package name must be specified as the first argument' fi if [[ "${version}" = '' ]] then - echo 'The version must be specified as the second argument' - exit 1 + error 'The version must be specified as the second argument' fi cd "${name}"