Added linux
This commit is contained in:
parent
1ea67e76c7
commit
ed3d99da90
20
README.md
20
README.md
@ -7,7 +7,7 @@ A sane default Firefox profile
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### For Mac
|
### Mac
|
||||||
```bash
|
```bash
|
||||||
NAME=$RANDOM
|
NAME=$RANDOM
|
||||||
git clone https://austenwares.com/gogs/stonewareslord/firefox-link "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
git clone https://austenwares.com/gogs/stonewareslord/firefox-link "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
||||||
@ -20,3 +20,21 @@ else
|
|||||||
fi
|
fi
|
||||||
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
|
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
```bash
|
||||||
|
NAME=$RANDOM
|
||||||
|
git clone https://austenwares.com/gogs/stonewareslord/firefox-link ~/.mozilla/firefox/$NAME
|
||||||
|
grep -qP '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini 2>&1 >/dev/null
|
||||||
|
if (( $? == 0 )); then
|
||||||
|
printf "\n[Profile$(expr 1 + $(cat ~/.mozilla/firefox/profiles.ini | grep -P '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini | tail -n1 | sed -e 's/\[Profile//' -e 's/\]//'))]\nName=firefox-link\nIsRelative=1\nPath=$NAME">>~/.mozilla/firefox/profiles.ini
|
||||||
|
else
|
||||||
|
mkdir -p ~/.mozilla/firefox
|
||||||
|
printf "\n[Profile0]\nName=firefox-link\nIsRelative=1\nPath=$NAME">>~/.mozilla/firefox/profiles.ini
|
||||||
|
fi
|
||||||
|
if command -v firefox 2>&1 /dev/null; then
|
||||||
|
firefox -p
|
||||||
|
else
|
||||||
|
firefox-bin -p
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user