Fix README.md mac/linux installation instructions
- Replaced git clone with wget/curl - Checked to make sure wget/curl exist before downloading
This commit is contained in:
parent
ed3d99da90
commit
f4cf45247c
25
README.md
25
README.md
@ -10,7 +10,17 @@ A sane default Firefox profile
|
|||||||
### Mac
|
### Mac
|
||||||
```bash
|
```bash
|
||||||
NAME=$RANDOM
|
NAME=$RANDOM
|
||||||
git clone https://austenwares.com/gogs/stonewareslord/firefox-link "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
if command -v wget 2>&1 >/dev/null; then
|
||||||
|
wget https://austenwares.com/gogs/stonewareslord/firefox-link/archive/master.tar.gz -O /tmp/firefox-link.tar.gz
|
||||||
|
elif command -v curl 2>&1 >/dev/null; then
|
||||||
|
curl https://austenwares.com/gogs/stonewareslord/firefox-link/archive/master.tar.gz -o /tmp/firefox-link.tar.gz
|
||||||
|
else
|
||||||
|
echo "Can't find curl or wget"
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
mkdir -p "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
||||||
|
cd "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
|
||||||
|
tar xvf /tmp/firefox-link.tar.gz
|
||||||
egrep -q '\[Profile\d+\]' "$HOME/Library/Application Support/Firefox/profiles.ini"
|
egrep -q '\[Profile\d+\]' "$HOME/Library/Application Support/Firefox/profiles.ini"
|
||||||
if (( $? == 0 )); then
|
if (( $? == 0 )); then
|
||||||
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"
|
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"
|
||||||
@ -20,11 +30,20 @@ else
|
|||||||
fi
|
fi
|
||||||
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
|
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
|
||||||
```
|
```
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
```bash
|
```bash
|
||||||
NAME=$RANDOM
|
NAME=$RANDOM
|
||||||
git clone https://austenwares.com/gogs/stonewareslord/firefox-link ~/.mozilla/firefox/$NAME
|
if command -v wget 2>&1 >/dev/null; then
|
||||||
|
wget https://austenwares.com/gogs/stonewareslord/firefox-link/archive/master.tar.gz -O /tmp/firefox-link.tar.gz
|
||||||
|
elif command -v curl 2>&1 >/dev/null; then
|
||||||
|
curl https://austenwares.com/gogs/stonewareslord/firefox-link/archive/master.tar.gz -o /tmp/firefox-link.tar.gz
|
||||||
|
else
|
||||||
|
echo "Can't find curl or wget"
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
mkdir -p ~/.mozilla/firefox/$NAME
|
||||||
|
cd ~/.mozilla/firefox/$NAME
|
||||||
|
tar xvf /tmp/firefox-link.tar.gz
|
||||||
grep -qP '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini 2>&1 >/dev/null
|
grep -qP '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini 2>&1 >/dev/null
|
||||||
if (( $? == 0 )); then
|
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
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user