distmaker - Reduce noise in dists/*.sh
authortotten@civicrm.org <Tim Otten>
Sat, 21 Jun 2014 11:25:17 +0000 (04:25 -0700)
committertotten@civicrm.org <Tim Otten>
Sun, 22 Jun 2014 07:55:07 +0000 (00:55 -0700)
distmaker/dists/drupal6_php5.sh
distmaker/dists/drupal_php5.sh
distmaker/dists/drupal_sk_php5.sh
distmaker/dists/joomla_php5.sh
distmaker/dists/l10n.sh
distmaker/dists/wordpress_php5.sh

index 84cc6af47e554a6066d6643a788690219522db21..b3ee75c9479c1c58e8ab8d45d2831d4a30e81ebc 100755 (executable)
@@ -1,26 +1,19 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
-
 # checkout the right code revisions
 pushd "$DM_SOURCEDIR/drupal"
 git checkout .
@@ -28,9 +21,7 @@ git checkout "$DM_REF_DRUPAL6"
 popd
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
+[ -d $TRG ] && rm -rf $TRG/*
 
 # copy all the stuff
 dm_install_core "$SRC" "$TRG"
index fcea93646603c934cf5ca7463362a22b6ec88829..f906729b9b4b0cd11c6268ac0d81bd46efc899e0 100755 (executable)
@@ -1,20 +1,14 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
@@ -27,9 +21,7 @@ git checkout "$DM_REF_DRUPAL"
 popd
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
+[ -d $TRG ] && rm -rf $TRG/*
 
 # copy all the stuff
 dm_install_core "$SRC" "$TRG"
index de8a3b945e9cb7a5f0521763131be1cc0d1527ca..448d85cc7a52c632400412f0cdc5ee2a558c64f2 100755 (executable)
@@ -1,20 +1,14 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
@@ -26,9 +20,7 @@ git checkout "$DM_REF_DRUPAL"
 popd
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
+[ -d $TRG ] && rm -rf $TRG/*
 
 # copy all the stuff
 dm_install_core "$SRC" "$TRG"
index 620ae6cc5505f4a009207ceec6b0ff857089a9ca..91ee8b92d02ac6b3004f00b2d7c754acb4dc11e0 100755 (executable)
@@ -1,20 +1,14 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
@@ -26,9 +20,7 @@ git checkout "$DM_REF_JOOMLA"
 popd
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
+[ -d $TRG ] && rm -rf $TRG/*
 
 # copy all the rest of the stuff
 dm_install_core "$SRC" "$TRG"
index 7106101f53ce522e09d033615246c9f71e7fc058..37486cd096ab27af1cee086c4e3969684144f2e7 100644 (file)
@@ -1,29 +1,21 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
 TRG=$DM_TMPDIR/civicrm
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
+[ -d $TRG ] && rm -rf $TRG/*
 
 # copy all the stuff
 dm_install_l10n "$SRC/l10n" "$TRG/l10n"
index 628bc84fce320ae25ada0ac5300886deb9c565d5..ea3582acfcde52f0de42560656556b217edc1be4 100644 (file)
@@ -1,20 +1,14 @@
 #!/bin/bash
 set -ex
 
-# This script assumes
-# that DAOs are generated
-# and all the necessary conversions had place!
-
 P=`dirname $0`
 CFFILE=$P/../distmaker.conf
-
 if [ ! -f $CFFILE ] ; then
        echo "NO DISTMAKER.CONF FILE!"
        exit 1
 else
        . $CFFILE
 fi
-
 . "$P/common.sh"
 
 SRC=$DM_SOURCEDIR
@@ -26,21 +20,8 @@ git checkout "$DM_REF_WORDPRESS"
 popd
 
 # make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
-
-if [ ! -d $TRG ] ; then
-       mkdir $TRG
-fi
-
-if [ ! -d $TRG/civicrm ] ; then
-       mkdir $TRG/civicrm
-fi
-
-if [ ! -d $TRG/civicrm/civicrm ] ; then
-       mkdir $TRG/civicrm/civicrm
-fi
+[ -d $TRG ] && rm -rf $TRG/*
+[ ! -d $TRG/civicrm/civicrm ] && mkdir -p $TRG/civicrm/civicrm
 
 # copy all the stuff
 dm_install_core "$SRC" "$TRG/civicrm/civicrm"