Skip to content

Commit

Permalink
Only try to install imagemagick/git if not already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
larzconwell committed Feb 7, 2012
1 parent d79902e commit 55e5a32
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
17 changes: 11 additions & 6 deletions recipes/centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ sudo yum install -y gcc-c++ patch \
echo "==> done..."

# Install imagemagick
echo -e "\n=> Installing imagemagick (this may take a while)..."
sudo yum install -y ImageMagick >> $log_file 2>&1
echo "==> done..."
# Convert is a part of imagemagick
if [ ! -f $(which convert) ]; then
echo -e "\n=> Installing imagemagick (this may take a while)..."
sudo yum install -y ImageMagick >> $log_file 2>&1
echo "==> done..."
fi

# Install Git
echo -e "\n=> Installing git..."
sudo yum install -y git >> $log_file 2>&1
echo "==> done..."
if [ ! -f $(which git) ]; then
echo -e "\n=> Installing git..."
sudo yum install -y git >> $log_file 2>&1
echo "==> done..."
fi
17 changes: 11 additions & 6 deletions recipes/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ sudo $pm -y install libsqlite3-0 sqlite3 libsqlite3-dev libmysqlclient16-dev lib
echo "==> done..."

# Install imagemagick
echo -e "\n=> Installing imagemagick (this may take a while)..."
sudo $pm -y install imagemagick libmagick9-dev >> $log_file 2>&1
echo "==> done..."
# Convert is a part of imagemagick
if [ ! -f $(which convert) ]; then
echo -e "\n=> Installing imagemagick (this may take a while)..."
sudo $pm -y install imagemagick libmagick9-dev >> $log_file 2>&1
echo "==> done..."
fi

# Install git-core
echo -e "\n=> Installing git..."
sudo $pm -y install git-core >> $log_file 2>&1
echo "==> done..."
if [ ! -f $(which git) ]; then
echo -e "\n=> Installing git..."
sudo $pm -y install git-core >> $log_file 2>&1
echo "==> done..."
fi

0 comments on commit 55e5a32

Please sign in to comment.