nebula/include/etc/skel/.local/bin/findFirefoxProfile.sh

11 lines
281 B
Bash
Raw Normal View History

2021-03-18 12:47:35 +00:00
#!/bin/bash
cd ~/.mozilla/firefox/
if [[ $(grep '\[Profile[^0]\]' profiles.ini) ]]
then PROFPATH=$(grep -E '^\[Profile|^Path|^Default' profiles.ini | grep -1 '^Default=1' | grep '^Path' | cut -c6-)
else PROFPATH=$(grep 'Path=' profiles.ini | sed 's/^Path=//')
fi
echo $PROFPATH