Skip to content

Commit

Permalink
Enforce running the scripts outside the git directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrothal committed Jun 20, 2012
1 parent aa33a3f commit c0cd9e7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
11 changes: 11 additions & 0 deletions XOpup_kernel_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions build_from_OLPC_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions create_xo_puppy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion make_build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c0cd9e7

Please sign in to comment.