runPythonEmacs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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 [ "$OTP" ]; then
  33. if [ "$debug" ]; then echo "OTP $OTP"; fi
  34. OTP=`cygpath -w $OTP`
  35. export OTP
  36. fi
  37. if [ "$GATEWAY" ]; then
  38. if [ "$debug" ]; then echo "GATEWAY $GATEWAY"; fi
  39. GATEWAY=`cygpath -w $GATEWAY`
  40. export GATEWAY
  41. fi
  42. if [ "$TOONTOWN" ]; then
  43. if [ "$debug" ]; then echo "TOONTOWN $TOONTOWN"; fi
  44. TOONTOWN=`cygpath -w $TOONTOWN`
  45. export TOONTOWN
  46. fi
  47. if [ "$PIRATES" ]; then
  48. if [ "$debug" ]; then echo "PIRATES $PIRATES"; fi
  49. PIRATES=`cygpath -w $PIRATES`
  50. export PIRATES
  51. fi
  52. if [ "$TOONTAG" ]; then
  53. if [ "$debug" ]; then echo "TOONTAG $TOONTAG"; fi
  54. TOONTAG=`cygpath -w $TOONTAG`
  55. export TOONTAG
  56. fi
  57. if [ "$BARTOP" ]; then
  58. if [ "$debug" ]; then echo "BARTOP $BARTOP"; fi
  59. BARTOP=`cygpath -w $BARTOP`
  60. export BARTOP
  61. fi
  62. if [ "$TTRADER" ]; then
  63. if [ "$debug" ]; then echo "TTRADER $TTRADER"; fi
  64. TTRADER=`cygpath -w $TTRADER`
  65. export TTRADER
  66. fi
  67. if [ "$VRIDE" ]; then
  68. if [ "$debug" ]; then echo "VRIDE $VRIDE"; fi
  69. VRIDE=`cygpath -w $VRIDE`
  70. export VRIDE
  71. fi
  72. if [ "$FOURD" ]; then
  73. if [ "$debug" ]; then echo "FOURD $FOURD"; fi
  74. FOURD=`cygpath -w $FOURD`
  75. export FOURD
  76. fi
  77. if [ "$MRM" ]; then
  78. if [ "$debug" ]; then echo "MRM $MRM"; fi
  79. MRM=`cygpath -w $MRM`
  80. export MRM
  81. fi
  82. if [ "$PARALLAX" ]; then
  83. if [ "$debug" ]; then echo "PARALLAX $PARALLAX"; fi
  84. PARALLAX=`cygpath -w $PARALLAX`
  85. export PARALLAX
  86. fi
  87. if [ "$MRM" ]; then
  88. if [ "$debug" ]; then echo "MRM $MRM"; fi
  89. MRM=`cygpath -w $MRM`
  90. export MRM
  91. fi
  92. if [ "$WINTOOLS" ]; then
  93. if [ "$debug" ]; then echo "WINTOOLS $WINTOOLS"; fi
  94. WINTOOLS=`cygpath -w $WINTOOLS`
  95. export WINTOOLS
  96. fi
  97. if [ "$PANDATOOL" ]; then
  98. if [ "$debug" ]; then echo "PANDATOOL $PANDATOOL"; fi
  99. PANDATOOL=`cygpath -w $PANDATOOL`
  100. export PANDATOOL
  101. fi
  102. if [ "$PANDAAPP" ]; then
  103. if [ "$debug" ]; then echo "PANDAAPP $PANDAAPP"; fi
  104. PANDAAPP=`cygpath -w $PANDAAPP`
  105. export PANDAAPP
  106. fi
  107. # Panda will now tolerate the colon in the de-cygpath version of the model trees
  108. if [ "$DMODELS" ]; then
  109. if [ "$debug" ]; then echo "DMODELS $DMODELS"; fi
  110. DMODELS=`cygpath -w $DMODELS`
  111. export DMODELS
  112. fi
  113. if [ "$TTMODELS" ]; then
  114. if [ "$debug" ]; then echo "TTMODELS $TTMODELS"; fi
  115. TTMODELS=`cygpath -w $TTMODELS`
  116. export TTMODELS
  117. fi
  118. # Pirates models
  119. if [ "$PMOCKUP" ]; then
  120. if [ "$debug" ]; then echo "PMOCKUP $PMOCKUP"; fi
  121. PMOCKUP=`cygpath -w $PMOCKUP`
  122. export PMOCKUP
  123. fi
  124. if [ "$BARMODELS" ]; then
  125. if [ "$debug" ]; then echo "BARMODELS $BARMODELS"; fi
  126. BARMODELS=`cygpath -w $BARMODELS`
  127. export BARMODELS
  128. fi
  129. # Export the proper home environment variable
  130. HOME=`cygpath -w $HOME`
  131. export HOME
  132. # Now start up emacs
  133. exec runemacs $@