modification of unix_setup.sh to fix installation on directories with space in their path

This commit is contained in:
Panagiotis Ntinis 2020-04-28 21:43:40 +03:00
parent 77a295cb67
commit cb396bb67c

View File

@ -55,15 +55,15 @@ else
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";
echo -n "Copying sleuthkit-$TSK_VERSION.jar into the Autopsy directory..." echo -n "Copying sleuthkit-$TSK_VERSION.jar 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 "ERROR: Deleting $ext_jar_filepath failed." echo "ERROR: Deleting $ext_jar_filepath failed."
echo "Please check your permissions." 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 "ERROR: Copying $sleuthkit_jar_filepath to $ext_jar_filepath failed." echo "ERROR: Copying $sleuthkit_jar_filepath to $ext_jar_filepath failed."
echo "Please check your permissions." echo "Please check your permissions."