@@ -28,6 +28,9 @@ if not (Process.uid == 0 or File.stat(msfbase).owned?)
28
28
$stderr. puts "Please run msfupdate as the same user who installed metasploit."
29
29
end
30
30
31
+ def is_pro
32
+ File . exists? ( File . expand_path ( File . join ( @msfbase_dir , ".." , "engine" , "update.rb" ) ) )
33
+ end
31
34
32
35
def is_git
33
36
File . directory? ( File . join ( @msfbase_dir , ".git" ) )
@@ -105,7 +108,7 @@ if is_git
105
108
# attempt to reapply them. If the user wants them back
106
109
# they can always git stash pop them, and that presumes
107
110
# they know what they're doing when they're editing local
108
- # checkout, which presumes they're not using msfupdate
111
+ # checkout, which presumes they're not using msfupdate
109
112
# to begin with.
110
113
#
111
114
# Note, this requires at least user.name and user.email
@@ -130,7 +133,12 @@ if is_git
130
133
system ( "git" , "merge" , "#{ remote } /#{ branch } " )
131
134
end
132
135
133
- unless is_svn || is_git
136
+ if is_pro
137
+ update_script = File . expand_path ( File . join ( @msfbase , ".." , "engine" , "update.rb" ) )
138
+ system ( "ruby" , update_script )
139
+ end
140
+
141
+ unless is_svn || is_git || is_pro
134
142
raise RuntimeError , "Cannot determine checkout type: `#{ @msfbase_dir } '"
135
143
end
136
144
0 commit comments