Tardiba - The Tasmanian Devil Database Server
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.

74 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/tardiba/config.in
  5. # Copyright (C) 2006 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. #Description: Tardiba - The Tasmanian Devil Database Server
  15. const SDECFG_TRG_TARDIBA ${target:-$SDECFG_TARGET}
  16. # helper functions
  17. get_target_choice() {
  18. cd target/$SDECFG_TARGET/$1
  19. for x in $( ls -1 *.choice ); do
  20. grep -H "^# *Description *: " $x | tr ' ' '_' |
  21. sed -e 's,^[0-9][0-9]*-,,' \
  22. -e 's,\.choice:#_*Description_*:_, ,'
  23. done
  24. }
  25. comment ' '
  26. comment '- Target Hardware'
  27. # Hardware Vendor
  28. comment 'Vendor - Model - Product Number'
  29. choice SDECFG_TRG_TARDIBA_HW_VENDOR none none 'No Hardware Vendor specified' \
  30. $( get_target_choice hardware )
  31. if [ "$SDECFG_TRG_TARDIBA_HW_VENDOR" != "none" ] ; then
  32. # Hardware Model
  33. choice SDECFG_TRG_TARDIBA_HW_MODEL none none 'No Model specified' \
  34. $( get_target_choice hardware/$SDECFG_TRG_TARDIBA_HW_VENDOR )
  35. # Hardware P/N
  36. if [ "$SDECFG_TRG_TARDIBA_HW_MODEL" != "none" ] ; then
  37. choice SDECFG_TRG_TARDIBA_HW_PN none none 'No P/N specified' \
  38. $( get_target_choice "hardware/$SDECFG_TRG_TARDIBA_HW_VENDOR/$SDECFG_TRG_TARDIBA_HW_MODEL" )
  39. fi
  40. fi
  41. if [ ! -s $cfgtmpdir/tardiba.config.in ]; then
  42. SDECFG_TRG_MNEMOSYNE=$( cat ./target/$SDECFG_TRG_TARDIBA/extends )
  43. if ! perl ./target/$SDECFG_TRG_MNEMOSYNE/mnemosyne.pl "./target/$SDECFG_TRG_TARDIBA/pkgsel" TRG_TARDIBA \
  44. $cfgtmpdir/tardiba.{config,rules,awkgen}.in; then
  45. echo "mnemosyne.pl failed!"
  46. rm -f $cfgtmpdir/tardiba.{config,rules,awkgen}.in
  47. fi
  48. fi
  49. if [ -s $cfgtmpdir/tardiba.config.in ]; then
  50. comment ' '
  51. comment '- Target Options'
  52. . $cfgtmpdir/tardiba.rules.in
  53. . $cfgtmpdir/tardiba.config.in
  54. else
  55. comment ' '
  56. comment 'ERROR: plugins config was not rendered!'
  57. fi
  58. comment ' '
  59. menu_begin MENU_MNEMOSYNE 'Advanced Options'