Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
0931e420
Unverified
Commit
0931e420
authored
6 years ago
by
Richard Cordovano
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1424 from dannysmyda/ntpath-setupDevRepos
Fixed the setupDevRepos for cygwin
parents
bf245aa7
9009af26
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setupDevRepos.py
+17
-7
17 additions, 7 deletions
setupDevRepos.py
with
17 additions
and
7 deletions
setupDevRepos.py
+
17
−
7
View file @
0931e420
...
@@ -8,24 +8,31 @@
...
@@ -8,24 +8,31 @@
import
os
import
os
import
subprocess
import
subprocess
import
ntpath
import
sys
import
sys
def
setupLibrary
(
path
):
def
makeRepos
(
path
):
'''
sets up the library path variable
'''
'''
creates the needed repositories
'''
git_repository_url
=
"
https://github.com/sleuthkit/
"
# Clone zlib
git_zlib_repository_url
=
"
https://github.com/madler/
"
git_zlib_repository_url
=
"
https://github.com/madler/
"
zlib_path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
path
[
"
libewf_64bit
"
],
"
zlib
"
))
zlib_path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
path
[
"
libewf_64bit
"
],
"
zlib
"
))
if
not
os
.
path
.
exists
(
zlib_path
):
if
not
os
.
path
.
exists
(
zlib_path
):
gitClone
(
git_zlib_repository_url
,
"
zlib
"
,
path
[
"
libewf_64bit
"
])
gitClone
(
git_zlib_repository_url
,
"
zlib
"
,
path
[
"
libewf_64bit
"
])
# Clone the others
git_repository_url
=
"
https://github.com/sleuthkit/
"
for
library
,
base_library_path
in
path
.
items
():
for
library
,
base_library_path
in
path
.
items
():
library_path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
base_library_path
,
library
))
library_path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
base_library_path
,
library
))
if
not
os
.
path
.
exists
(
library_path
):
if
not
os
.
path
.
exists
(
library_path
):
gitClone
(
git_repository_url
,
library
,
base_library_path
)
gitClone
(
git_repository_url
,
library
,
base_library_path
)
def
gitClone
(
URL
,
repo
,
path
):
def
gitClone
(
URL
,
repo
,
path
):
# This method will clone the library if it does not exist
# This method will clone the library if it does not exist
cmd
=
[
"
git
"
,
"
clone
"
,
URL
+
repo
+
"
.git
"
]
cmd
=
[
"
git
"
,
"
clone
"
,
URL
+
repo
+
"
.git
"
]
print
(
"
Cloning
"
+
repo
+
"
into
"
+
path
)
ret
=
subprocess
.
call
(
cmd
,
stdout
=
sys
.
stdout
,
cwd
=
path
)
ret
=
subprocess
.
call
(
cmd
,
stdout
=
sys
.
stdout
,
cwd
=
path
)
if
ret
!=
0
:
if
ret
!=
0
:
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
@@ -36,25 +43,28 @@ def main():
...
@@ -36,25 +43,28 @@ def main():
libewf_home
=
os
.
getenv
(
"
LIBEWF_HOME
"
)
libewf_home
=
os
.
getenv
(
"
LIBEWF_HOME
"
)
libvhdi_home
=
os
.
getenv
(
"
LIBVHDI_HOME
"
)
libvhdi_home
=
os
.
getenv
(
"
LIBVHDI_HOME
"
)
libvmdk_home
=
os
.
getenv
(
"
LIBVMDK_HOME
"
)
libvmdk_home
=
os
.
getenv
(
"
LIBVMDK_HOME
"
)
base_Library_path
=
{}
base_Library_path
=
{}
if
(
libewf_home
!=
None
):
if
(
libewf_home
!=
None
):
base_Library_path
[
"
libewf_64bit
"
]
=
os
.
path
.
dirname
(
libewf_home
)
base_Library_path
[
"
libewf_64bit
"
]
=
nt
path
.
dirname
(
libewf_home
)
else
:
else
:
print
(
'
Please set the env variable LIBEWF_HOME
'
)
print
(
'
Please set the env variable LIBEWF_HOME
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
(
libvhdi_home
!=
None
):
if
(
libvhdi_home
!=
None
):
base_Library_path
[
"
libvhdi_64bit
"
]
=
os
.
path
.
dirname
(
libvhdi_home
)
base_Library_path
[
"
libvhdi_64bit
"
]
=
nt
path
.
dirname
(
libvhdi_home
)
else
:
else
:
print
(
'
Please set the env variable LIBVHDI_HOME
'
)
print
(
'
Please set the env variable LIBVHDI_HOME
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
(
libvmdk_home
!=
None
):
if
(
libvmdk_home
!=
None
):
base_Library_path
[
"
libvmdk_64bit
"
]
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
libvmdk_home
))
base_Library_path
[
"
libvmdk_64bit
"
]
=
nt
path
.
dirname
(
nt
path
.
dirname
(
libvmdk_home
))
else
:
else
:
print
(
'
Please set the env variable LIBVMDK_HOME
'
)
print
(
'
Please set the env variable LIBVMDK_HOME
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
setupLibrary
(
base_Library_path
);
makeRepos
(
base_Library_path
);
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
main
()
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment