Fix mac with no git #1

Open
opened 2016-05-26 01:53:11 -04:00 by stonewareslord · 1 comment

Test if git command exists before cloning. New installations don't have git

Alternatively, why not just wget/curl the tar from gogs?

Test if git command exists before cloning. New installations don't have git Alternatively, why not just wget/curl the tar from gogs?
Author
Owner
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"
cd "$HOME/Library/Application Support/Firefox"
tar xvf /tmp/firefox-link.tar.gz
``` 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" cd "$HOME/Library/Application Support/Firefox" tar xvf /tmp/firefox-link.tar.gz ```
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stonewareslord/firefox-link#1
No description provided.