small changes to install-stepmania.pl

This commit is contained in:
AJ Kelly
2011-08-23 15:18:35 -05:00
parent f75757ea4e
commit b1061937f6
+5 -16
View File
@@ -53,14 +53,11 @@ sub ReadCommand
{ {
++$cur; ++$cur;
} }
next; next;
} }
$ret[$cur] .= $ch; $ret[$cur] .= $ch;
} }
return @ret; return @ret;
} }
print "guh\n"; print "guh\n";
@@ -82,19 +79,18 @@ sub CreateDirectories
} }
} }
if ($#ARGV == -1) if ($#ARGV == -1)
{ {
print "Install where? (eg. /usr/games/sm-ssc)\n"; print "Install where? (eg. /usr/games/stepmania5)\n";
exit 1; exit 1;
} }
my $instdir = $ARGV[0]; my $instdir = $ARGV[0];
print "Installing to $instdir\n"; print "Installing to $instdir\n";
# Normally, this script is run after building, which means we probably have a Makefile # Normally, this script is run after building, which means we probably
# available. Look for it, and pull out vpath, if any, to see where the real source # have a Makefile available. Look for it, and pull out vpath, if any,
# directory is. # to see where the real source directory is.
my $bin_path; my $bin_path;
@@ -120,7 +116,6 @@ print "Binary path: $bin_path\n";
open(F, "sm-ssc.nsi") || die "Couldn't open sm-ssc.nsi: $!"; open(F, "sm-ssc.nsi") || die "Couldn't open sm-ssc.nsi: $!";
# Search for the default installation section. # Search for the default installation section.
my $FoundSection = 0; my $FoundSection = 0;
while(!eof(F)) while(!eof(F))
@@ -133,7 +128,6 @@ while(!eof(F))
$FoundSection = 1; $FoundSection = 1;
last; last;
} }
} }
$FoundSection || die "sm-ssc.nsi parse error"; $FoundSection || die "sm-ssc.nsi parse error";
@@ -175,7 +169,6 @@ while(!eof(F))
# { # {
# mkdir($line[1]) || die "mkdir($line[1]): $!"; # mkdir($line[1]) || die "mkdir($line[1]): $!";
# } # }
#
# next; # next;
# } # }
@@ -238,20 +231,16 @@ while(!eof(F))
{ {
system("rm $args \"$dir\""); system("rm $args \"$dir\"");
} }
next; next;
} }
} }
$FoundSection || print "warning: SectionEnd not found\n"; $FoundSection || print "warning: SectionEnd not found\n";
close F; close F;
system("cp -vp \"" . $bin_path . "sm-ssc\" \"$instdir\""); system("cp -vp \"" . $bin_path . "stepmania5\" \"$instdir\"");
if( -e $bin_path . "GtkModule.so" ) if( -e $bin_path . "GtkModule.so" )
{ {
system("cp -vp \"" . $bin_path . "GtkModule.so\" \"$instdir\""); system("cp -vp \"" . $bin_path . "GtkModule.so\" \"$instdir\"");
} }