]> granicus.if.org Git - python/commitdiff
Only fix up pathnames in installed scripts when needed, i.e. when not installing
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 16 Jun 2003 15:10:47 +0000 (15:10 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 16 Jun 2003 15:10:47 +0000 (15:10 +0000)
to /. Pathnames are correct for installing to / since the DESTDIR patch.

Mac/OSX/Dist/resources/postflight

index 0e95f9deda7692e45a4156a2a481d8f94caea72a..71ff2c175934860ca81f7f4ac954fec3b7a59b41 100755 (executable)
@@ -66,24 +66,25 @@ if [ "$DEST" = "/" ]; then
        done
 fi
 
-
-# The link in the app bundles and in pydoc need updating.
-installed_python=$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python
-for app in BuildApplet IDLE PackageManager PythonIDE; do
-    ln -fsh  $installed_python \
-          $DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS
-    ed -s $DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS/$app << xyzzy
+if [ "$DEST" != "/" ]; then
+       # The link in the app bundles and in pydoc need updating.
+       installed_python=$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python
+       for app in BuildApplet IDLE PackageManager PythonIDE; do
+               ln -fsh  $installed_python \
+                         $DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS
+               ed -s $DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS/$app << xyzzy
 1c
 #!$installed_python
 .
 w
 q
 xyzzy
-ed -s $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin/pydoc << xyzzy
+       ed -s $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin/pydoc << xyzzy
 1c
 #!$installed_python
 .
 w
 q
 xyzzy
-done
+       done
+fi