Permalink
Browse files

Enforce running the scripts outside the git directory

  • Loading branch information...
1 parent aa33a3f commit c0cd9e78e4cee5a9f5cc3f5e9c10e2e99cd80b1e @mavrothal committed Jun 20, 2012
Showing with 33 additions and 1 deletion.
  1. +11 −0 XOpup_kernel_builder.sh
  2. +10 −0 build_from_OLPC_git.sh
  3. +11 −0 create_xo_puppy.sh
  4. +1 −1 make_build
View
11 XOpup_kernel_builder.sh
@@ -21,6 +21,17 @@ VER=14
BASEDIR=`pwd`
CWD="$BASEDIR"
+
+INSIDE=`echo $BASEDIR | grep Pox_git`
+if [ "$INSIDE" != "" ] ; then
+ echo -e "\\0033[1;31m"
+ echo "Running this script from within the Pox_git folder will fail"
+ echo "Run it from the XO_build directory that make_build generates"
+ echo -en "\\0033[0;39m"
+ sleep 5
+ exit 0
+fi
+
mkdir $BASEDIR/kernel_sources
sources="$BASEDIR/kernel_sources"
git_clone="$sources/olpc-2.6"
View
10 build_from_OLPC_git.sh
@@ -13,6 +13,16 @@ VER=5
BASEDIR=`pwd`
CWD="$BASEDIR"
+INSIDE=`echo $BASEDIR | grep Pox_git`
+if [ "$INSIDE" != "" ] ; then
+ echo -e "\\0033[1;31m"
+ echo "Running this script from within the Pox_git folder will fail"
+ echo "Run it from the XO_build directory that make_build generates"
+ echo -en "\\0033[0;39m"
+ sleep 5
+ exit 0
+fi
+
if [ ! -d $BASEDIR/XO_SFS_sources ] ; then
mkdir $BASEDIR/XO_SFS_sources
fi
View
11 create_xo_puppy.sh
@@ -25,6 +25,17 @@ VER=1.0
PWD="`pwd`"
CWD="$PWD"
+INSIDE=`echo $PWD | grep Pox_git`
+if [ "$INSIDE" != "" ] ; then
+ echo -e "\\0033[1;31m"
+ echo "Running this script from within the Pox_git folder will fail"
+ echo "Run it from the XO_build directory that make_build generates"
+ echo -en "\\0033[0;39m"
+ sleep 5
+ exit 0
+fi
+
+
#read config
. $CWD/pkgs_remrc
View
2 make_build
@@ -85,7 +85,7 @@ fi
prepare()
{
NOWDIR=`pwd`
-INSIDE=`echo $NOWDIR | grep Pxo_git`
+INSIDE=`echo $NOWDIR | grep Pox_git`
if [ "$INSIDE" != "" ] ; then
echo -e "\\0033[1;31m"
echo "Run this script form _1_ level above the Pox_git folder"

0 comments on commit c0cd9e7

Please sign in to comment.