Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0-only
0003 
0004 # Dummy script that always succeeds.
0005 
0006 # Check if the first parameter appears in the rest. Succeeds if found.
0007 # This helper is useful if a particular option was passed to this script.
0008 # Typically used like this:
0009 #   arg_contain <word-you-are-searching-for> "$@"
0010 arg_contain ()
0011 {
0012         search="$1"
0013         shift
0014 
0015         while [ $# -gt 0 ]
0016         do
0017                 if [ "$search" = "$1" ]; then
0018                         return 0
0019                 fi
0020                 shift
0021         done
0022 
0023         return 1
0024 }
0025 
0026 if arg_contain --version "$@" || arg_contain -v "$@"; then
0027         progname=$(basename $0)
0028         echo "GNU $progname (scripts/dummy-tools/$progname) 2.50"
0029         exit 0
0030 fi