runPythonEmacs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #! /bin/sh
  2. #debug=1
  3. # Under Windows/Cygwin, we have to de-cygwinify the semicolon
  4. # separated PYTHONPATH
  5. # First, initialize the new path
  6. NEWPYTHONPATH=
  7. # To iterate, temporarily change the semicolons into spaces
  8. for path in `echo $PYTHONPATH | sed 'y/;/ /'`; do
  9. # Then for each entry run it through the cygwin filter
  10. NEWPYTHONPATH=$NEWPYTHONPATH\;`cygpath -w $path`
  11. done
  12. # Export the new PYTHONPATH
  13. PYTHONPATH=$NEWPYTHONPATH
  14. export PYTHONPATH
  15. # Lets also de-cygwinify the Project variables (so you can use file name
  16. # completion) This is hardcoded for the most popular trees
  17. if [ "$DTOOL" ]; then
  18. if [ "$debug" ]; then echo "DTOOL $DTOOL"; fi
  19. DTOOL=`cygpath -w $DTOOL`
  20. export DTOOL
  21. fi
  22. if [ "$PANDA" ]; then
  23. if [ "$debug" ]; then echo "PANDA $PANDA"; fi
  24. PANDA=`cygpath -w $PANDA`
  25. export PANDA
  26. fi
  27. if [ "$DIRECT" ]; then
  28. if [ "$debug" ]; then echo "DIRECT $DIRECT"; fi
  29. DIRECT=`cygpath -w $DIRECT`
  30. export DIRECT
  31. fi
  32. if [ "$TOONTOWN" ]; then
  33. if [ "$debug" ]; then echo "TOONTOWN $TOONTOWN"; fi
  34. TOONTOWN=`cygpath -w $TOONTOWN`
  35. export TOONTOWN
  36. fi
  37. if [ "$TOONTAG" ]; then
  38. if [ "$debug" ]; then echo "TOONTAG $TOONTAG"; fi
  39. TOONTAG=`cygpath -w $TOONTAG`
  40. export TOONTAG
  41. fi
  42. if [ "$BARTOP" ]; then
  43. if [ "$debug" ]; then echo "BARTOP $BARTOP"; fi
  44. BARTOP=`cygpath -w $BARTOP`
  45. export BARTOP
  46. fi
  47. if [ "$TTRADER" ]; then
  48. if [ "$debug" ]; then echo "TTRADER $TTRADER"; fi
  49. TTRADER=`cygpath -w $TTRADER`
  50. export TTRADER
  51. fi
  52. if [ "$VRIDE" ]; then
  53. if [ "$debug" ]; then echo "VRIDE $VRIDE"; fi
  54. VRIDE=`cygpath -w $VRIDE`
  55. export VRIDE
  56. fi
  57. if [ "$WINTOOLS" ]; then
  58. if [ "$debug" ]; then echo "WINTOOLS $WINTOOLS"; fi
  59. WINTOOLS=`cygpath -w $WINTOOLS`
  60. export WINTOOLS
  61. fi
  62. if [ "$PANDATOOL" ]; then
  63. if [ "$debug" ]; then echo "PANDATOOL $PANDATOOL"; fi
  64. PANDATOOL=`cygpath -w $PANDATOOL`
  65. export PANDATOOL
  66. fi
  67. if [ "$PANDAAPP" ]; then
  68. if [ "$debug" ]; then echo "PANDAAPP $PANDAAPP"; fi
  69. PANDAAPP=`cygpath -w $PANDAAPP`
  70. export PANDAAPP
  71. fi
  72. # Panda will now tolerate the colon in the de-cygpath version of the model trees
  73. if [ "DMODELS" ]; then
  74. if [ "$debug" ]; then echo "DMODELS $DMODELS"; fi
  75. DMODELS=`cygpath -w $DMODELS`
  76. export DMODELS
  77. fi
  78. if [ "$TTMODELS" ]; then
  79. if [ "$debug" ]; then echo "TTMODELS $TTMODELS"; fi
  80. TTMODELS=`cygpath -w $TTMODELS`
  81. export TTMODELS
  82. fi
  83. if [ "$BARMODELS" ]; then
  84. if [ "$debug" ]; then echo "BARMODELS $BARMODELS"; fi
  85. BARMODELS=`cygpath -w $BARMODELS`
  86. export BARMODELS
  87. fi
  88. # Export the proper home environment variable
  89. HOME=`cygpath -w $HOME`
  90. export HOME
  91. # Now start up emacs
  92. exec runemacs $@