ld 605 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0-only
  3. # Dummy script that always succeeds.
  4. # Check if the first parameter appears in the rest. Succeeds if found.
  5. # This helper is useful if a particular option was passed to this script.
  6. # Typically used like this:
  7. # arg_contain <word-you-are-searching-for> "$@"
  8. arg_contain ()
  9. {
  10. search="$1"
  11. shift
  12. while [ $# -gt 0 ]
  13. do
  14. if [ "$search" = "$1" ]; then
  15. return 0
  16. fi
  17. shift
  18. done
  19. return 1
  20. }
  21. if arg_contain --version "$@" || arg_contain -v "$@"; then
  22. progname=$(basename $0)
  23. echo "GNU $progname (scripts/dummy-tools/$progname) 2.50"
  24. exit 0
  25. fi