mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
resolved merge conflicts
This commit is contained in:
commit
fcb53364ff
@ -1,68 +1,80 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
# Verifies programs are installed and copies native code into the Autopsy folder structure
|
# Verifies programs are installed and copies native code into the Autopsy folder structure
|
||||||
|
#
|
||||||
|
|
||||||
# NOTE: update_sleuthkit_version.pl updates this value and relies
|
# NOTE: update_sleuthkit_version.pl updates this value and relies
|
||||||
# on it keeping the same name and whitespace. Don't change it.
|
# on it keeping the same name and whitespace. Don't change it.
|
||||||
TSK_VERSION=4.6.5
|
TSK_VERSION=4.6.5
|
||||||
|
|
||||||
|
|
||||||
|
# In the beginning...
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo "Checking prerequisites and preparing Autopsy:"
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
|
||||||
# Verify PhotoRec was installed
|
# Verify PhotoRec was installed
|
||||||
|
echo -n "Checking for PhotoRec..."
|
||||||
photorec_filepath=/usr/bin/photorec
|
photorec_filepath=/usr/bin/photorec
|
||||||
photorec_osx_filepath=/usr/local/bin/photorec
|
photorec_osx_filepath=/usr/local/bin/photorec
|
||||||
if [ -f "$photorec_filepath" ] || [ -f "$photorec_osx_filepath" ]; then
|
if [ -f "$photorec_filepath" ]; then
|
||||||
echo "photorec found"
|
echo "found in $(dirname $photorec_filepath)"
|
||||||
|
elif [ -f "$photorec_osx_filepath" ]; then
|
||||||
|
echo "found in $(dirname $photorec_osx_filepath)"
|
||||||
else
|
else
|
||||||
echo "ERROR: Photorec not found, please install the testdisk package"
|
echo "ERROR: PhotoRec not found, please install the testdisk package."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify Java was installed and configured
|
# Verify Java was installed and configured
|
||||||
|
echo -n "Checking for Java..."
|
||||||
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 "Java found in $JAVA_HOME"
|
echo "found in $JAVA_HOME"
|
||||||
else
|
else
|
||||||
echo "ERROR: Java was not found in $JAVA_HOME"
|
echo "ERROR: Java was not found in $JAVA_HOME."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "ERROR: JAVA_HOME environment variable must be defined"
|
echo "ERROR: JAVA_HOME environment variable must be defined."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify Sleuth Kit Java was installed
|
# Verify Sleuth Kit Java was installed
|
||||||
|
echo -n "Checking for Sleuth Kit Java bindings..."
|
||||||
|
|
||||||
if [ -f "/usr/share/java/sleuthkit-$TSK_VERSION.jar" ]; then
|
if [ -f "/usr/share/java/sleuthkit-$TSK_VERSION.jar" ]; then
|
||||||
sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar
|
sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar
|
||||||
|
echo "found in $(dirname $sleuthkit_jar_filepath)"
|
||||||
elif [ -f "/usr/local/share/java/sleuthkit-$TSK_VERSION.jar" ]; then
|
elif [ -f "/usr/local/share/java/sleuthkit-$TSK_VERSION.jar" ]; then
|
||||||
sleuthkit_jar_filepath=/usr/local/share/java/sleuthkit-$TSK_VERSION.jar
|
sleuthkit_jar_filepath=/usr/local/share/java/sleuthkit-$TSK_VERSION.jar
|
||||||
|
echo "found in $(dirname $sleuthkit_jar_filepath)"
|
||||||
else
|
else
|
||||||
echo "sleuthkit.jar file not found"
|
echo "ERROR: sleuthkit-$TSK_VERSION.jar not found in /usr/share/java/ or /usr/local/share/java/."
|
||||||
echo "exiting .."
|
echo "Please install the Sleuth Kit Java bindings file."
|
||||||
|
echo "See https://github.com/sleuthkit/sleuthkit/releases."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
echo -n "Copying sleuthkit-$TSK_VERSION.jar into the Autopsy directory..."
|
||||||
echo "$sleuthkit_jar_filepath found"
|
|
||||||
echo "Copying into the Autopsy directory"
|
|
||||||
rm -f $ext_jar_filepath;
|
rm -f $ext_jar_filepath;
|
||||||
if [ "$?" -gt 0 ]; then #checking if remove operation failed
|
if [ "$?" -gt 0 ]; then #checking if remove operation failed
|
||||||
echo "exiting .."
|
echo "ERROR: Deleting $ext_jar_filepath failed."
|
||||||
|
echo "Please check your permissions."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
cp $sleuthkit_jar_filepath $ext_jar_filepath
|
cp $sleuthkit_jar_filepath $ext_jar_filepath
|
||||||
if [ "$?" -ne 0 ]; then # checking copy operation was successful
|
if [ "$?" -ne 0 ]; then # checking copy operation was successful
|
||||||
echo "exiting..."
|
echo "ERROR: Copying $sleuthkit_jar_filepath to $ext_jar_filepath failed."
|
||||||
|
echo "Please check your permissions."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
echo "done"
|
||||||
else
|
|
||||||
echo "ERROR: $sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure it is executable
|
# make sure it is executable
|
||||||
chmod u+x bin/autopsy
|
chmod u+x bin/autopsy
|
||||||
|
|
||||||
|
echo
|
||||||
echo "Autopsy is now configured. You can execute bin/autopsy to start it"
|
echo "Autopsy is now configured. You can execute bin/autopsy to start it"
|
||||||
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user