env.in 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. ####
  3. #### Copyright (C) 2015
  4. #### David Pirotte <david at altosw dot be>
  5. #### This file is part of Guile-Squee.
  6. #### Guile-Squee is free software: you can redistribute it and/or
  7. #### modify it under the terms of the GNU Lesser General Public
  8. #### License as published by the Free Software Foundation, either
  9. #### version 3 of the License, or (at your option) any later version.
  10. #### Guile-Squee is distributed in the hope that it will be useful,
  11. #### but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. #### Lesser General Public License for more details.
  14. #### You should have received a copy of the GNU Lesser General Public
  15. #### License along with Guile-Squee. If not, see
  16. #### <http://www.gnu.org/licenses/>.
  17. ####
  18. top_srcdir="@abs_top_srcdir@"
  19. top_builddir="@abs_top_builddir@"
  20. [ x"$top_srcdir" = x -o ! -d "$top_srcdir" -o \
  21. x"$top_builddir" = x -o ! -d "$top_builddir" ] && {
  22. echo $0: bad environment
  23. echo top_srcdir=$top_srcdir
  24. echo top_builddir=$top_builddir
  25. exit 1
  26. }
  27. if [ x"$GUILE_LOAD_PATH" = x ]
  28. then
  29. GUILE_LOAD_PATH=$top_srcdir
  30. else
  31. GUILE_LOAD_PATH=$top_srcdir:$GUILE_LOAD_PATH
  32. fi
  33. if [ x"$GUILE_LOAD_COMPILED_PATH" = x ]
  34. then
  35. GUILE_LOAD_COMPILED_PATH=$top_srcdir
  36. else
  37. GUILE_LOAD_COMPILED_PATH=$top_srcdir:$GUILE_LOAD_COMPILED_PATH
  38. fi
  39. if [ $top_srcdir != $top_builddir ]
  40. then
  41. GUILE_LOAD_PATH=$top_builddir:$GUILE_LOAD_PATH
  42. GUILE_LOAD_COMPILED_PATH=$top_builddir:$GUILE_LOAD_COMPILED_PATH
  43. fi
  44. # echo $GUILE_LOAD_PATH
  45. # echo $GUILE_LOAD_COMPILED_PATH
  46. export GUILE_LOAD_PATH
  47. export GUILE_LOAD_COMPILED_PATH
  48. exec "$@"