proto.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ########################################################################
  2. # #
  3. # This file is part of the ksh 93u+m package #
  4. # Copyright (c) 2021 Contributors to ksh 93u+m #
  5. # <https://github.com/ksh93/ksh> #
  6. # and is licensed under the #
  7. # Eclipse Public License, Version 2.0 #
  8. # #
  9. # A copy of the License is available at #
  10. # https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html #
  11. # (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) #
  12. # #
  13. # Martijn Dekker <martijn@inlv.org> #
  14. # #
  15. ########################################################################
  16. # proto(1) has been removed. This is a backwards compatibility stub that allows
  17. # compiling older AST code (with Mamfiles containing proto commands) using the
  18. # current INIT system. This stub ignores all options, then invokes 'cat'.
  19. while getopts ':dfhinprstvzPSC:e:l:o:L:' opt
  20. do case $opt in
  21. \?) case $OPTARG in
  22. +) ;;
  23. *) echo "proto: $OPTARG: unknown option"
  24. echo 'Usage: proto [-dfhinprstvzP+S] [-C directory] [-e package] [-l file]'
  25. echo ' [-o "name='\''value'\'' ..."] [-L file] file ...'
  26. exit 2
  27. ;;
  28. esac >&2
  29. ;;
  30. esac
  31. done
  32. shift $((OPTIND - 1))
  33. exec cat -- "$@"