summaryrefslogtreecommitdiff
path: root/common-settings
blob: b39952a36eed7849dc89e212961e68c0273d1b2b (plain)
  1. #!/bin/sh
  2. # Load settings
  3. set -e
  4. . ./defaults.cfg || exit 1
  5. shareddir="hosts"
  6. sharedfile="host"
  7. customfile="host.cfg"
  8. if [ -f "$customfile" ]; then
  9. if [ -f "$sharedfile" ]; then
  10. echo "W: Ignoring shared host config \"$sharedfile\" - using custom \"$customfile\" instead."
  11. fi
  12. . "$customfile"
  13. elif [ -f "$sharedfile" ]; then
  14. . "$shareddir"/`cat "$sharedfile" |head -1`
  15. else
  16. echo "E: No host config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
  17. fi
  18. shareddir="targets"
  19. sharedfile="target"
  20. customfile="target.cfg"
  21. if [ -f "$customfile" ]; then
  22. if [ -f "$sharedfile" ]; then
  23. echo "W: Ignoring shared target config \"$sharedfile\" - using custom \"$customfile\" instead."
  24. fi
  25. . "$customfile"
  26. elif [ -f "$sharedfile" ]; then
  27. . "$shareddir"/`cat "$sharedfile" |head -1`
  28. else
  29. echo "E: No target config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
  30. fi
  31. . ./defaults-aftermath.cfg || exit 1