beginning of unix setup changes

This commit is contained in:
Greg DiCristofaro 2021-09-27 12:11:31 -04:00
parent b8585e89ff
commit 800ce196a8

View File

@ -8,6 +8,30 @@
TSK_VERSION=4.11.0 TSK_VERSION=4.11.0
usage() {
echo "Usage: unix_setup.sh [-j java_home]" 1>&2;
}
while getopts "j:" o; do
case "${o}" in
j)
JAVA_PATH=${OPTARG}
;;
*)
usage
exit 1
;;
esac
done
if [[ -z "${SLEUTHKIT_SRC_DIR}" ]] || [[ -z "${TSK_BRANCH}" ]]; then
usage
exit 1
fi
# In the beginning... # In the beginning...
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Checking prerequisites and preparing Autopsy:" echo "Checking prerequisites and preparing Autopsy:"
@ -28,7 +52,14 @@ fi
# Verify Java was installed and configured # Verify Java was installed and configured
echo -n "Checking for Java..." echo -n "Checking for Java..."
if [ -n "$JAVA_HOME" ]; then if [ -n "$JAVA_PATH"]; then
if [ -x "$JAVA_PATH/bin/java" ]; then
# TODO
else
echo "ERROR: Java was not found in $JAVA_PATH."
exit 1
fi
elif [ -n "$JAVA_HOME" ]; then
if [ -x "$JAVA_HOME/bin/java" ]; then if [ -x "$JAVA_HOME/bin/java" ]; then
echo "found in $JAVA_HOME" echo "found in $JAVA_HOME"
else else