Permalink
Browse files

Only try to install imagemagick/git if not already installed

  • Loading branch information...
1 parent d79902e commit 55e5a325a271ab69fbbe7e9247bb206803269a5b @larzconwell larzconwell committed Feb 7, 2012
Showing with 22 additions and 12 deletions.
  1. +11 −6 recipes/centos.sh
  2. +11 −6 recipes/ubuntu.sh
View
17 recipes/centos.sh
@@ -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
View
17 recipes/ubuntu.sh
@@ -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.