[89971] trunk/base/src/port1.0/portmain.tcl

jberry at macports.org jberry at macports.org
Fri Feb 17 10:27:49 PST 2012


Revision: 89971
          http://trac.macports.org/changeset/89971
Author:   jberry at macports.org
Date:     2012-02-17 10:27:49 -0800 (Fri, 17 Feb 2012)
Log Message:
-----------
Whitespace only: tabs to spaces

Modified Paths:
--------------
    trunk/base/src/port1.0/portmain.tcl

Modified: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl	2012-02-17 18:24:25 UTC (rev 89970)
+++ trunk/base/src/port1.0/portmain.tcl	2012-02-17 18:27:49 UTC (rev 89971)
@@ -148,76 +148,76 @@
 
 
 proc is_valid_developer_dir { dir } {
-	# Check whether specified directory looks valid for an Xcode installation
-	
-	# Verify that the directory exists
-	if {![file isdirectory $dir]} {
-		return 0
-	}
-	
-	# Verify that the directory has some key subdirectories
-	foreach subdir {Headers Library usr} {
-		if {![file isdirectory "${dir}/${subdir}"]} {
-			return 0
-		}
-	}
-	
-	# The specified directory seems valid for Xcode
-	return 1
+    # Check whether specified directory looks valid for an Xcode installation
+    
+    # Verify that the directory exists
+    if {![file isdirectory $dir]} {
+        return 0
+    }
+    
+    # Verify that the directory has some key subdirectories
+    foreach subdir {Headers Library usr} {
+        if {![file isdirectory "${dir}/${subdir}"]} {
+            return 0
+        }
+    }
+    
+    # The specified directory seems valid for Xcode
+    return 1
 }
 
 
 proc get_xcode_suggestions {} {
-	# Ask mdfind where Xcode is
-	set result ""
+    # Ask mdfind where Xcode is
+    set result ""
     if {![catch {set mdfind [binaryInPath mdfind]}]} {
-    	set result [exec $mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"]
-	}
-	return $result
+        set result [exec $mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"]
+    }
+    return $result
 }
 
 
 proc portmain::get_developer_dir {} {
-	set devdir ""
+    set devdir ""
 
-	# Look for xcodeselect, and make sure it has a valid value
+    # Look for xcodeselect, and make sure it has a valid value
     if {![catch {set xcodeselect [binaryInPath xcode-select]}]} {
-		
-		# We have xcodeselect: ask it where xcode is
-    	set devdir [exec $xcodeselect -print-path 2> /dev/null]
+        
+        # We have xcodeselect: ask it where xcode is
+        set devdir [exec $xcodeselect -print-path 2> /dev/null]
 
-		# If the the directory is valid, use it
-    	if {[is_valid_developer_dir $devdir]} {
-    		return $devdir
-    	}
-    	
-    	# The directory from xcodeselect isn't correct.
-    	# Make some suggestions for the user
-    	set installed_xcodes [get_xcode_suggestions]
-    	if {[llength $installed_xcodes] == 0} {
-    		# No installed Xcodes found
-    		ui_error "No Xcode installation was found; please install Xcode"
-    	} else {
-    		# One, or more than one, Xcode installations found
-    		ui_error "No valid Xcode installation is properly selected"
-    		
-    		ui_error
-    		ui_error "Please use xcode-select to select an Xcode version:"
-    		foreach xcode $installed_xcodes {
-    			ui_error "    sudo xcode-select -switch ${xcode}"
-    		}
-    		ui_error
-    	}
+        # If the the directory is valid, use it
+        if {[is_valid_developer_dir $devdir]} {
+            return $devdir
+        }
+        
+        # The directory from xcodeselect isn't correct.
+        # Make some suggestions for the user
+        set installed_xcodes [get_xcode_suggestions]
+        if {[llength $installed_xcodes] == 0} {
+            # No installed Xcodes found
+            ui_error "No Xcode installation was found; please install Xcode"
+        } else {
+            # One, or more than one, Xcode installations found
+            ui_error "No valid Xcode installation is properly selected"
+            
+            ui_error
+            ui_error "Please use xcode-select to select an Xcode version:"
+            foreach xcode $installed_xcodes {
+                ui_error "    sudo xcode-select -switch ${xcode}"
+            }
+            ui_error
+        }
     }
     
     # xcode-select wasn't found, look for Xcode at /Developer
     set devdir "/Developer"
     if {[is_valid_developer_dir $devdir]} {
-    	return $devdir
+        return $devdir
     }
     
     ui_error
-	ui_error "No valid Xcode installation was found: please install Xcode"
+    ui_error "No valid Xcode installation was found: please install Xcode"
     ui_error
     
     # We return /Developer here even though we know it's wrong. Abort instead?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120217/4e5d0e4e/attachment.html>


More information about the macports-changes mailing list