mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
fixes
This commit is contained in:
parent
238c75a100
commit
9cee1e413e
@ -44,7 +44,7 @@ if [[ -z "$APPLICATION_ZIP_PATH" ]] && [[ ! -d "$INSTALL_DIR" ]]; then
|
||||
fi
|
||||
|
||||
# check against the asc file if the zip exists
|
||||
if [[ -n "$ASC_FILE" ]] && [[ -n "$APPLCATION_ZIP_PATH" ]]; then
|
||||
if [[ -n "$ASC_FILE" ]] && [[ -n "$APPLICATION_ZIP_PATH" ]]; then
|
||||
VERIFY_DIR=$(pwd)/temp
|
||||
KEY_DIR=$VERIFY_DIR/private
|
||||
mkdir -p $VERIFY_DIR &&
|
||||
@ -65,7 +65,7 @@ ZIP_NAME="${ZIP_FILE_NAME%.*}"
|
||||
APPLICATION_EXTRACTED_PATH=$INSTALL_DIR/$ZIP_NAME/
|
||||
|
||||
# if specifying a zip path, ensure directory doesn't exist and then create and extract
|
||||
if [[ -n "$APPLCATION_ZIP_PATH" ]]; then
|
||||
if [[ -n "$APPLICATION_ZIP_PATH" ]]; then
|
||||
if [[ -d $APPLICATION_EXTRACTED_PATH || -f $APPLICATION_EXTRACTED_PATH ]]; then
|
||||
echo "A file or directory already exists at $APPLICATION_EXTRACTED_PATH" >>/dev/stderr
|
||||
exit 1
|
||||
@ -81,7 +81,10 @@ if [[ -n "$APPLCATION_ZIP_PATH" ]]; then
|
||||
fi
|
||||
|
||||
echo "Setting up application at $APPLICATION_EXTRACTED_PATH..."
|
||||
pushd $APPLICATION_EXTRACTED_PATH &&
|
||||
# find unix_setup.sh in least nested path (https://stackoverflow.com/a/40039568/2375948)
|
||||
UNIX_SETUP_PATH=`find $APPLICATION_EXTRACTED_PATH -name 'unix_setup.sh' -printf "%d %p\n"| sort -n | perl -pe 's/^\d+\s//;' | head -n1 | xargs -I{} dirname {}`
|
||||
|
||||
pushd $UNIX_SETUP_PATH &&
|
||||
chown -R $(whoami) . &&
|
||||
chmod u+x ./unix_setup.sh &&
|
||||
./unix_setup.sh -j $JAVA_PATH -n $APPLICATION_NAME &&
|
||||
@ -90,5 +93,5 @@ if [[ $? -ne 0 ]]; then
|
||||
echo "Unable to setup permissions for application binaries" >>/dev/stderr
|
||||
exit 1
|
||||
else
|
||||
echo "Application setup done."
|
||||
echo "Application setup done. You can run $APPLICATION_NAME from $UNIX_SETUP_PATH/bin/$APPLICATION_NAME."
|
||||
fi
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Clones sleuthkit repo from github (if necessary) and installs
|
||||
# this script does require sudo privileges
|
||||
# called like: build_tsk.sh -r <repo path to be created or existing> -b <tsk branch to checkout> -r <non-standard remote repo (optional)>
|
||||
# called like: build_tsk.sh -p <repo path to be created or existing> -b <tsk branch to checkout> -r <non-standard remote repo (optional)>
|
||||
|
||||
usage() {
|
||||
echo "Usage: install_tsk_from_src [-p repo_path (should end with '/sleuthkit')] [-b tsk_branch] [-r sleuthkit_repo]" 1>&2
|
||||
|
Loading…
x
Reference in New Issue
Block a user