mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Updated comments.
This commit is contained in:
parent
b36912acd4
commit
baf04f327b
@ -1,49 +1,52 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Verifies programs are installed and copies native code into the Autopsy folder structure
|
||||||
|
|
||||||
|
TSK_VERSION=4.6.0
|
||||||
|
|
||||||
|
# Verify PhotoRec was installed
|
||||||
photorec_filepath=/usr/bin/photorec
|
photorec_filepath=/usr/bin/photorec
|
||||||
if [ -f "$photorec_filepath" ]; then
|
if [ -f "$photorec_filepath" ]; then
|
||||||
echo "$photorec_filepath found"
|
echo "$photorec_filepath found"
|
||||||
else
|
else
|
||||||
echo "Photorec not found, please install testdisk for the photorec carver functionality"
|
echo "ERROR: Photorec not found, please install the testdisk package"
|
||||||
echo "run the command: sudo apt-get install testdisk"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Verify Java was installed and configured
|
||||||
if [ -n "$JAVA_HOME" ]; then
|
if [ -n "$JAVA_HOME" ]; then
|
||||||
if [ -x "$JAVA_HOME/bin/java" ]; then
|
if [ -x "$JAVA_HOME/bin/java" ]; then
|
||||||
echo "found java executable in $JAVA_HOME"
|
echo "Java found in $JAVA_HOME"
|
||||||
else
|
else
|
||||||
echo "no executable found in $JAVA_HOME"
|
echo "ERROR: Java was not found in $JAVA_HOME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Set JAVA_HOME env variable"
|
echo "ERROR: JAVA_HOME environment variable must be defined"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TSK_VERSION=4.6.0
|
# Verify Sleuth Kit Java was installed
|
||||||
sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar;
|
sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar;
|
||||||
ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar;
|
ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar;
|
||||||
if [ -f "$sleuthkit_jar_filepath" ]; then
|
if [ -f "$sleuthkit_jar_filepath" ]; then
|
||||||
echo "$sleuthkit_jar_filepath found"
|
echo "$sleuthkit_jar_filepath found"
|
||||||
echo "copying $sleuthkit_jar_filepath to the autopsy directory"
|
echo "Copying into the Autopsy directory"
|
||||||
echo "deleting $ext_jar_filepath"
|
|
||||||
rm $ext_jar_filepath;
|
rm $ext_jar_filepath;
|
||||||
if [ "$?" -gt 0 ]; then #checking if remove operation failed
|
if [ "$?" -gt 0 ]; then #checking if remove operation failed
|
||||||
echo "exiting .."
|
echo "exiting .."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Successfully removed $ext_jar_filepath"
|
|
||||||
cp $sleuthkit_jar_filepath $ext_jar_filepath
|
cp $sleuthkit_jar_filepath $ext_jar_filepath
|
||||||
if [ "$?" -eq 0 ]; then # checking copy operation was successful
|
if [ "$?" -eq 0 ]; then # checking copy operation was successful
|
||||||
echo "Successfully copied $sleuthkit_jar_filepath"
|
# echo "Successfully copied $sleuthkit_jar_filepath"
|
||||||
else
|
else
|
||||||
echo "exiting..."
|
echo "exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file"
|
echo "ERROR: $sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user