diff --git a/Core/build.xml b/Core/build.xml
index e75c217d15..655e756c25 100644
--- a/Core/build.xml
+++ b/Core/build.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/build.xml b/build.xml
index c43701e11d..70ec4cb290 100644
--- a/build.xml
+++ b/build.xml
@@ -87,7 +87,12 @@
-
+
+
+
+
+
+
diff --git a/preinstall.sh b/preinstall.sh
index 4c4fd388e3..2c1088fabd 100644
--- a/preinstall.sh
+++ b/preinstall.sh
@@ -1,27 +1,39 @@
#!/bin/bash
-photorec_filepath=/usr/bin/photorec;
+photorec_filepath=/usr/bin/photorec
if [ -f "$photorec_filepath" ]; then
- echo "photorec found"
+ echo "$photorec_filepath found"
else
echo "Photorec not found, please install testdisk for the photorec carver functionality"
echo "run the command: sudo apt-get install testdisk"
+ exit 1
fi
-
-sleuthkit_jar_filepath=/usr/share/java/sleuthkit-4.6.0.jar;
-ext_jar_filepath=./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar;
-if [ -f "$sleuthkit_jar_filepath" ]; then
- echo "sleuthkit jarfile found";
- echo "copying sleuthkit-jar file to the autopsy directory";
- rm ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar
- if [ ! -f "$ext_jar_filepath" ]; then
- cp $sleuthkit_jar_filepath ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar;
- echo "Successfully copied sleuthkit-jar file";
- echo "run autopsy";
- fi
+VERSION=4.6.0
+sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$VERSION.jar;
+ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$VERSION.jar;
+if [[ -f "$sleuthkit_jar_filepath" ]] && [[ -f "$ext_jar_filepath" ]]; then
+ echo "$sleuthkit_jar_filepath found"
+ echo "copying $sleuthkit_jar_filepath to the autopsy directory"
+ echo "deleting $ext_jar_filepath"
+ rm $ext_jar_filepath;
+ if [ "$?" -gt 0 ]; then #checking if remove operation failed
+ echo "exiting .."
+ exit 1
+ else
+ echo "Successfully removed $ext_jar_filepath"
+ cp $sleuthkit_jar_filepath $ext_jar_filepath
+ if [ "$?" -eq 0 ]; then # checking copy operation was successful
+ echo "Successfully copied $sleuthkit_jar_filepath"
+ else
+ echo "exiting..."
+ exit 1
+ fi
+ fi
else
- echo "Sleuthkit-jar not found, please install the sleuthkit-java.deb file"
+ echo "$sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file"
echo "run the command: sudo apt install ./sleuthkit-java_4.6.0-1_amd64.deb inside the debian file directory"
+ exit 1
fi
+echo "Autopsy is now configured. You can execute bin/autopsy to start it"