mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 22:17:55 -05:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -217,10 +217,21 @@ def isBashSourceFile(File file) {
|
||||
// NOTE: bash/shell scripts without extension will not utilize a header
|
||||
return filename.endsWith(".py") ||
|
||||
filename.endsWith(".sh") ||
|
||||
filename.endsWith(".ps1") ||
|
||||
filename.endsWith(".bash") ||
|
||||
filename.endsWith(".command");
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* checks if a file supports a Windows Batch style header based on its extension.
|
||||
*********************************************************************************/
|
||||
def isBatchSourceFile(File file) {
|
||||
|
||||
String filename = file.getName().toLowerCase();
|
||||
|
||||
return filename.endsWith(".bat");
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
* Gets the ip for a file in the module from its header (or certification.manifest)
|
||||
@@ -236,6 +247,9 @@ def getIp(File projectDir, File file) {
|
||||
ip = getIpForSourceFile(file, "# IP:");
|
||||
}
|
||||
}
|
||||
else if (isBatchSourceFile(file)) {
|
||||
ip = getIpForSourceFile(file, ":: IP:");
|
||||
}
|
||||
if (ip == null) {
|
||||
ip = getIpForNonSourceFile(projectDir, file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user