瀏覽代碼

o grep for CYGWIN to recognize any cygwin environment
o extra echo to keep PandaModulesUnsqueezed.py rename from failing

Joseph Lee 22 年之前
父節點
當前提交
c5975d23f7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      direct/src/ffi/genPyCode

+ 2 - 1
direct/src/ffi/genPyCode

@@ -45,7 +45,7 @@ pyDir=$DIRECT/lib/py
 extDir=$DIRECT/src/extensions
 extDir=$DIRECT/src/extensions
 pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
 pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
 
 
-if [ $(uname) = "CYGWIN_NT-5.0" -o $(uname) = "CYGWIN_NT-5.1" ]; then
+if [ $(uname | grep CYGWIN) ]; then
   install_dir="$(cygpath -aw $install_dir)"
   install_dir="$(cygpath -aw $install_dir)"
   pyDir="$(cygpath -w $pyDir)"
   pyDir="$(cygpath -w $pyDir)"
   extDir="$(cygpath -w $extDir)"
   extDir="$(cygpath -w $extDir)"
@@ -97,6 +97,7 @@ else
     echo RENAMING PandaModulesUnsqueezed.py to PandaModules.py
     echo RENAMING PandaModulesUnsqueezed.py to PandaModules.py
     cd $pyDir              || exit
     cd $pyDir              || exit
     rm -f PandaModules.py* || exit
     rm -f PandaModules.py* || exit
+    echo # junk line needed to keep mv from failing
     mv PandaModulesUnsqueezed.py PandaModules.py || exit
     mv PandaModulesUnsqueezed.py PandaModules.py || exit
 fi
 fi