Paste number 8708: InstallationCheck

Index of paste annotations: 1

Paste number 8708: InstallationCheck
Pasted by: dmacks
When:4 years, 1 month ago
Share:Tweet this! | http://paste.lisp.org/+6PW
Channel:#fink
Paste contents:
Raw Source | XML | Display As
 	if ((-e "$basedir") || (-l "$basedir"))
 	{
 	  print "Fink Installer: ROOT /sw exists!\n";
 	  $result = ((1 << 6) | (1 << 5) | 19);
   	  last;
 	} 
+	if (symlink("$basedir", "$basedir.tmp"))
+	{
+	unlink("$basedir.tmp");
+	} else {
+	  print "Fink Installer: This volume does not support symlinks!\n";
+	  $result = ((1 << 6) | (1 << 5) | 19);  # need a new msg number here
+  	  last;
+	} 
 	$TargetSystemBuild = GetPathEntry("/System/Library/CoreServices/SystemVersion.plist", "ProductBuildVersion");

Annotations for this paste:

Annotation number 1: drm: this is better
Pasted by: dmacks
When:4 years, 1 month ago
Share:Tweet this! | http://paste.lisp.org/+6PW#1
Paste contents:
Raw Source | Display As
Switch $basedir and $basedir.tmp (that way we try to create $basedir (which we know doesn't exist) instead of $basedir.tmp (which may exist, which doesn't matter, but would cause test to fail)

Colorize as:
Show Line Numbers
Index of paste annotations: 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.