detect profile folder automatically
This commit is contained in:
parent
41ac13de12
commit
5c028ce258
1 changed files with 2 additions and 5 deletions
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
# VARIABLES, CHANGE AS NEEDED
|
# VARIABLES, CHANGE AS NEEDED
|
||||||
GITHUB_REPO="https://github.com/bmFtZQ/edge-frfox.git"
|
GITHUB_REPO="https://github.com/bmFtZQ/edge-frfox.git"
|
||||||
PROFILE_ROOTDIR=$(find ~/.mozilla/firefox -type d -iname "*.default-release");
|
PROFILE_ROOTDIR=~/.mozilla/firefox/$(grep Default= ~/.mozilla/firefox/installs.ini | tail -1 | cut -c 9-);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "Detecting if firefox is installed on your system..."
|
echo "Detecting if firefox is installed on your system..."
|
||||||
if [ ! -f /usr/bin/firefox ] || { [ ! -f /usr/lib/firefox/firefox ]; }; then
|
if [ ! -f /usr/bin/firefox ] || { [ ! -f /usr/lib/firefox/firefox ]; }; then
|
||||||
|
@ -25,7 +23,6 @@ if [ ! $? -eq 0 ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Prompting for correct install directory
|
# Prompting for correct install directory
|
||||||
read -e -i "$PROFILE_ROOTDIR" -p "Enter profile root directory: " newdir
|
read -e -i "$PROFILE_ROOTDIR" -p "Enter profile root directory: " newdir
|
||||||
PROFILE_ROOTDIR="${newdir:-$PROFILE_ROOTDIR}"
|
PROFILE_ROOTDIR="${newdir:-$PROFILE_ROOTDIR}"
|
||||||
|
@ -34,7 +31,7 @@ if [ ! -d "$PROFILE_ROOTDIR" ]; then
|
||||||
echo "ERROR: firefox profile directory could not be found"
|
echo "ERROR: firefox profile directory could not be found"
|
||||||
|
|
||||||
while [ ! -d "$PROFILE_ROOTDIR" ]; do
|
while [ ! -d "$PROFILE_ROOTDIR" ]; do
|
||||||
read -p "Enter active root directory found in about:profiles here: " PROFILE_ROOTDIR;
|
read -p "Enter active root directory found in \"about:profiles\" here: " PROFILE_ROOTDIR;
|
||||||
|
|
||||||
if [ ! -d "$PROFILE_ROOTDIR" ]; then
|
if [ ! -d "$PROFILE_ROOTDIR" ]; then
|
||||||
echo "invalid directory: specified location does not exist. Try again..."
|
echo "invalid directory: specified location does not exist. Try again..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue