Re: [PATCH libdrm 01/11] symbols-check: add new meta-script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4 April 2018 at 16:41, Eric Engestrom <eric.engestrom@xxxxxxxxxx> wrote:

> --- /dev/null
> +++ b/symbols-check
> @@ -0,0 +1,79 @@
> +#!/bin/sh
> +set -eu
> +set -o pipefail
> +
We could drop the execute bit, shebang and set. Pretty much all of it
is handled by the callers (modulo pipefail)

> +if [ -z "$LIB" ]; then
> +  echo "\$LIB needs to be defined for autotools to be able to run this test"
> +  exit 1
> +fi
> +
> +# The lib name is passed in with Meson but autotools doesn't support that
> +# so it needs to be hardcoded and overwritten here
> +if [ $# -ge 1 ]; then
> +  LIB=$1
> +fi
> +
> +if ! [ -f "$LIB" ]; then
> +  echo "lib $LIB doesn't exist"
> +  exit 1
> +fi
> +
> +if [ -z "$NM" ]; then
> +  echo "\$NM is undefined or empty"
> +  exit 1

I would drop all these - set -u will provide reasonable error handling

HTH
Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux