OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. #!/bin/bash
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../stone/stone.sh
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. export SETUPD="${SETUPD:-/etc/stone.d}"
  17. if type -p dialog > /dev/null ; then
  18. export SETUPG="${SETUPG:-dialog}"
  19. else
  20. export SETUPG="${SETUPG:-text}"
  21. fi
  22. export STONE="`type -p $0`"
  23. if [ "$1" = "-text" ] ; then SETUPG="text" ; shift ; fi
  24. if [ "$1" = "-dialog" ] ; then SETUPG="dialog" ; shift ; fi
  25. if [ "$1" = "-x11" ] ; then SETUPG="x11" ; shift ; fi
  26. . ${SETUPD}/gui_${SETUPG}.sh
  27. if [ "$1" -a -f "${SETUPD}/mod_$1.sh" ]
  28. then
  29. . ${SETUPD}/mod_$1.sh ; shift
  30. if [ -z "$*" ] ; then
  31. main
  32. else
  33. eval "$*"
  34. fi
  35. elif [ "$#" = 0 -a -f ${SETUPD}/default.sh ]
  36. then
  37. . ${SETUPD}/default.sh
  38. elif [ "$#" = 0 ]
  39. then
  40. while
  41. command="gui_menu main 'Main Menu - Select the Subsystem you want to configure'"
  42. while read a b c cmd name ; do
  43. x="'" ; cmd="${cmd//,/ }"
  44. command="$command '${name//$x/$x\\$x$x}'"
  45. command="$command '$STONE ${cmd//$x/$x\\$x$x}'"
  46. done < <( grep -h '^# \[MAIN\] [0-9][0-9] ' \
  47. $SETUPD/mod_*.sh | sort )
  48. eval "$command"
  49. do : ; done
  50. else
  51. echo
  52. echo "STONE - Setup Tool ONE - System Configuration"
  53. echo
  54. echo "Usage: $0 [ -text | -dialog | -x11 ] [ module [ command ] ]"
  55. echo
  56. fi