diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 22:39:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 23:00:21 -0400 |
commit | 23213bda24af601acbbea5731246a055680b48d0 (patch) | |
tree | 09fe7c18f2d5cecca569658c4968357274392769 /src/pkgbuild-check-nonfree | |
parent | d958a33c1f0e11b770481a9188cbf75cc3bfd0a5 (diff) |
Variables inside of $((...)) don't need a $ in front of them.
These were found with the help of shellcheck.
Diffstat (limited to 'src/pkgbuild-check-nonfree')
-rwxr-xr-x | src/pkgbuild-check-nonfree | 20 |
1 files changed, 10 insertions, 10 deletions
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 |