Check if directory exists in a better manner

* This avoids warnings like: line 8: cd: /tmp/jquery.ime:
   No such file or directory.
 * Formatting fixes.

Change-Id: Icbc3f6f80314cae3ea9b5dfdc3e66c59af225621
This commit is contained in:
Kartik Mistry
2014-02-11 17:39:24 +05:30
parent 7de150c90a
commit f25fca0dcb
4 changed files with 32 additions and 4 deletions

View File

@@ -4,7 +4,14 @@ DEST="../lib/jquery.i18n";
CLONEDIR="/tmp/jquery.i18n";
HERE=`pwd`;
UPSTREAM="https://github.com/wikimedia/jquery.i18n.git";
echo -e "Getting latest jquery.i18n from $UPSTREAM\n";
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
if [ -d $CLONEDIR ]; then
git pull;
else
git clone $UPSTREAM $CLONEDIR;
fi
cd $HERE;
cp -rf $CLONEDIR/src/* $DEST

View File

@@ -4,8 +4,15 @@ DEST="../lib/jquery.ime";
CLONEDIR="/tmp/jquery.ime";
HERE=`pwd`;
UPSTREAM="https://github.com/wikimedia/jquery.ime.git";
echo -e "Getting latest jquery.ime from $UPSTREAM\n";
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
if [ -d $CLONEDIR ]; then
git pull;
else
git clone $UPSTREAM $CLONEDIR;
fi
cd $CLONEDIR;
npm install;
grunt copy concat;

View File

@@ -4,7 +4,14 @@ DEST="../lib/jquery.uls";
CLONEDIR="/tmp/jquery.uls";
HERE=`pwd`;
UPSTREAM="https://github.com/wikimedia/jquery.uls.git";
echo -e "Getting latest jquery.uls from $UPSTREAM\n";
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
if [ -d $CLONEDIR ]; then
git pull;
else
git clone $UPSTREAM $CLONEDIR;
fi
cd $HERE;
cp -rf $CLONEDIR/{images,css,src,i18n} $DEST

View File

@@ -4,7 +4,14 @@ DEST="../lib/";
CLONEDIR="/tmp/jquery.webfonts";
HERE=`pwd`;
UPSTREAM="https://github.com/wikimedia/jquery.webfonts.git";
echo -e "Getting latest jquery.webfonts from $UPSTREAM\n";
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
if [ -d $CLONEDIR ]; then
git pull;
else
git clone $UPSTREAM $CLONEDIR;
fi
cd $HERE;
cp -rf $CLONEDIR/src/* $DEST