Possible bash fix
This commit is contained in:
parent
6955dc78e3
commit
ccc7856a69
10
README.md
10
README.md
@ -4,13 +4,13 @@ A sane default firefox profile
|
||||
## For Mac
|
||||
```bash
|
||||
NAME=$RANDOM
|
||||
git clone https://austenwares.com/gogs/stonewareslord/firefox-link ~"/Library/Application Support/Firefox/Profiles/$NAME"
|
||||
egrep -q '\[Profile\d+\]' ~"/Library/Application Support/Firefox/profiles.ini"
|
||||
git clone https://austenwares.com/gogs/stonewareslord/firefox-link "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
||||
egrep -q '\[Profile\d+\]' "$HOME/Library/Application Support/Firefox/profiles.ini"
|
||||
if (( $? == 0 )); then
|
||||
printf "\n[Profile$(expr 1 + $(cat ~"/Library/Application Support/Firefox/profiles.ini" | egrep '\[Profile\d+\]' | tail -n1 | sed -e 's/\[Profile//' -e 's/\]//'))]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>~"/Library/Application Support/Firefox/profiles.ini"
|
||||
printf "\n[Profile$(expr 1 + $(cat "$HOME/Library/Application Support/Firefox/profiles.ini" | egrep '\[Profile\d+\]' | tail -n1 | sed -e 's/\[Profile//' -e 's/\]//'))]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>"$HOME/Library/Application Support/Firefox/profiles.ini"
|
||||
else
|
||||
mkdir -p ~"/Library/Application Support/Firefox/"
|
||||
printf "\n[Profile0]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>~"/Library/Application Support/Firefox/profiles.ini"
|
||||
mkdir -p "$HOME/Library/Application Support/Firefox/"
|
||||
printf "\n[Profile0]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>"$HOME/Library/Application Support/Firefox/profiles.ini"
|
||||
fi
|
||||
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user