mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
unix_setup improvements
This commit is contained in:
parent
6cad1a4aca
commit
2c2cc3f984
@ -35,6 +35,10 @@ echo "---------------------------------------------"
|
|||||||
echo "Checking prerequisites and preparing ${APPLICATION_NAME}:"
|
echo "Checking prerequisites and preparing ${APPLICATION_NAME}:"
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
|
|
||||||
|
# make sure cwd is same as script's
|
||||||
|
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
pushd $SCRIPTPATH
|
||||||
|
|
||||||
# Verify PhotoRec was installed
|
# Verify PhotoRec was installed
|
||||||
echo -n "Checking for PhotoRec..."
|
echo -n "Checking for PhotoRec..."
|
||||||
photorec_filepath=/usr/bin/photorec
|
photorec_filepath=/usr/bin/photorec
|
||||||
@ -53,7 +57,8 @@ echo -n "Checking for Java..."
|
|||||||
if [ -n "$JAVA_PATH" ]; then
|
if [ -n "$JAVA_PATH" ]; then
|
||||||
if [ -x "$JAVA_PATH/bin/java" ]; then
|
if [ -x "$JAVA_PATH/bin/java" ]; then
|
||||||
# only works on linux; not os x
|
# only works on linux; not os x
|
||||||
sed -Ei '/^#?\s*jdkhome=.*$' "etc/$APPLICATION_NAME.conf"
|
awk '!/^\s*#?\s*jdkhome=.*$/' etc/$APPLICATION_NAME.conf > etc/$APPLICATION_NAME.conf.tmp && \
|
||||||
|
mv etc/$APPLICATION_NAME.conf.tmp etc/$APPLICATION_NAME.conf && \
|
||||||
echo "jdkhome=$JAVA_PATH" >> etc/$APPLICATION_NAME.conf
|
echo "jdkhome=$JAVA_PATH" >> etc/$APPLICATION_NAME.conf
|
||||||
else
|
else
|
||||||
echo "ERROR: Java was not found in $JAVA_PATH."
|
echo "ERROR: Java was not found in $JAVA_PATH."
|
||||||
@ -113,6 +118,8 @@ chmod -R u+x autopsy/solr/bin
|
|||||||
# make sure it is executable
|
# make sure it is executable
|
||||||
chmod u+x bin/$APPLICATION_NAME
|
chmod u+x bin/$APPLICATION_NAME
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Application is now configured. You can execute bin/$APPLICATION_NAME to start it"
|
echo "Application is now configured. You can execute bin/$APPLICATION_NAME to start it"
|
||||||
echo
|
echo
|
Loading…
x
Reference in New Issue
Block a user