Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Enforce running the scripts outside the git directory

  • Loading branch information...
commit c0cd9e78e4cee5a9f5cc3f5e9c10e2e99cd80b1e 1 parent aa33a3f
mavrothal authored June 20, 2012
11  XOpup_kernel_builder.sh
@@ -21,6 +21,17 @@ VER=14
21 21
 
22 22
 BASEDIR=`pwd`
23 23
 CWD="$BASEDIR" 
  24
+
  25
+INSIDE=`echo $BASEDIR | grep Pox_git`
  26
+if [ "$INSIDE" != "" ] ; then
  27
+	echo -e "\\0033[1;31m"
  28
+	echo "Running this script from within the Pox_git folder will fail"
  29
+	echo "Run it from the XO_build directory that make_build generates"
  30
+	echo -en "\\0033[0;39m"
  31
+	sleep 5
  32
+	exit 0
  33
+fi
  34
+
24 35
 mkdir $BASEDIR/kernel_sources
25 36
 sources="$BASEDIR/kernel_sources"
26 37
 git_clone="$sources/olpc-2.6"
10  build_from_OLPC_git.sh
@@ -13,6 +13,16 @@ VER=5
13 13
 BASEDIR=`pwd`
14 14
 CWD="$BASEDIR" 
15 15
 
  16
+INSIDE=`echo $BASEDIR | grep Pox_git`
  17
+if [ "$INSIDE" != "" ] ; then
  18
+	echo -e "\\0033[1;31m"
  19
+	echo "Running this script from within the Pox_git folder will fail"
  20
+	echo "Run it from the XO_build directory that make_build generates"
  21
+	echo -en "\\0033[0;39m"
  22
+	sleep 5
  23
+	exit 0
  24
+fi
  25
+
16 26
 if [ ! -d $BASEDIR/XO_SFS_sources ] ; then 
17 27
 	mkdir $BASEDIR/XO_SFS_sources
18 28
 fi
11  create_xo_puppy.sh
@@ -25,6 +25,17 @@ VER=1.0
25 25
 PWD="`pwd`"
26 26
 CWD="$PWD"
27 27
 
  28
+INSIDE=`echo $PWD | grep Pox_git`
  29
+if [ "$INSIDE" != "" ] ; then
  30
+	echo -e "\\0033[1;31m"
  31
+	echo "Running this script from within the Pox_git folder will fail"
  32
+	echo "Run it from the XO_build directory that make_build generates"
  33
+	echo -en "\\0033[0;39m"
  34
+	sleep 5
  35
+	exit 0
  36
+fi
  37
+
  38
+
28 39
 #read config
29 40
 . $CWD/pkgs_remrc
30 41
 
2  make_build
@@ -85,7 +85,7 @@ fi
85 85
 prepare()
86 86
 {
87 87
 NOWDIR=`pwd`
88  
-INSIDE=`echo $NOWDIR | grep Pxo_git`
  88
+INSIDE=`echo $NOWDIR | grep Pox_git`
89 89
 if [ "$INSIDE" != "" ] ; then
90 90
 	echo -e "\\0033[1;31m"
91 91
 	echo "Run this script form _1_ level above the Pox_git folder"

0 notes on commit c0cd9e7

Please sign in to comment.
Something went wrong with that request. Please try again.