From 23213bda24af601acbbea5731246a055680b48d0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 20 Apr 2017 22:39:20 -0400 Subject: Variables inside of $((...)) don't need a $ in front of them. These were found with the help of shellcheck. --- src/pkgbuild-check-nonfree | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/pkgbuild-check-nonfree') diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree index d5495c7..e291dbe 100755 --- a/src/pkgbuild-check-nonfree +++ b/src/pkgbuild-check-nonfree @@ -81,7 +81,7 @@ main() { *) usage >&2; return $_E_ERROR;; esac done - shift $(($OPTIND - 1)) + shift $((OPTIND - 1)) if [[ $# -lt 1 ]]; then pkgbuilds=("`pwd`/PKGBUILD") else @@ -113,7 +113,7 @@ main() { declare -i ret=0 local pkgbuild for pkgbuild in "${pkgbuilds[@]}"; do - pkgbuild_check "$pkgbuild" || ret=$(($ret|$?)) + pkgbuild_check "$pkgbuild" || ret=$((ret|$?)) done return $ret } @@ -250,17 +250,17 @@ pkgbuild_check() ( fi # Check if this is blacklisted - check_pkg "${pkgbase:-${pkgname[0]}}" || ret=$(($ret|$?)) + check_pkg "${pkgbase:-${pkgname[0]}}" || ret=$((ret|$?)) # Check if dependencies are blacklisted for dep in "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}" \ "${optdepends[@]%%:*}" "${mkdepends[@]}" do - check_dep "$dep" || ret=$(($ret|$?)) + check_dep "$dep" || ret=$((ret|$?)) ck_deps+=("$dep") done # Check the licenses for lic in "${license[@]}"; do - check_lic "$lic" || ret=$(($ret|$?)) + check_lic "$lic" || ret=$((ret|$?)) ck_lics+=("$lic") done @@ -269,7 +269,7 @@ pkgbuild_check() ( # Make sure a license is set if [[ ${#ck_lics[@]} == 0 ]]; then error "The license array is empty" - ret=$(($ret|$_E_ERROR)) + ret=$((ret|_E_ERROR)) fi else # Split package @@ -282,23 +282,23 @@ pkgbuild_check() ( eval "$(pkgbuild_get_pkg_ary "$_pkgname" optdepends _optdepends)" # Check if this is blacklisted - check_pkg "$_pkgname" || ret=$(($ret|$?)) + check_pkg "$_pkgname" || ret=$((ret|$?)) # Check if dependencies are blacklisted for dep in "${_depends[@]}" "${_optdepends[@]%%:*}"; do if ! in_array "$dep" "${ck_deps[@]}"; then - check_dep "$dep" || ret=$(($ret|$?)) + check_dep "$dep" || ret=$((ret|$?)) fi done # Check the licenses for lic in "${_license[@]}"; do if ! in_array "$lic" "${ck_lics[@]}"; then - check_lic "$lic" || ret=$(($ret|$?)) + check_lic "$lic" || ret=$((ret|$?)) fi done if [[ ${#_license[@]} == 0 ]]; then error "The license array is empty" - ret=$(($ret|$_E_ERROR)) + ret=$((ret|_E_ERROR)) fi done fi -- cgit v1.2.2