Skip to content

Commit

Permalink
Move the xctool dependency to cibuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
robrix committed Dec 18, 2014
1 parent 05c2043 commit 474f1bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 33 deletions.
33 changes: 0 additions & 33 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,12 @@

export SCRIPT_DIR=$(dirname "$0")

##
## Configuration Variables
##

config ()
{
# A whitespace-separated list of executables that must be present and locatable.
: ${REQUIRED_TOOLS="xctool"}

export REQUIRED_TOOLS
}

##
## Bootstrap Process
##

main ()
{
config

if [ -n "$REQUIRED_TOOLS" ]
then
echo "*** Checking dependencies..."
check_deps
fi

local submodules=$(git submodule status)
local result=$?

Expand All @@ -43,19 +23,6 @@ main ()
fi
}

check_deps ()
{
for tool in $REQUIRED_TOOLS
do
which -s "$tool"
if [ "$?" -ne "0" ]
then
echo "*** Error: $tool not found. Please install it and bootstrap again."
exit 1
fi
done
}

bootstrap_submodule ()
{
local bootstrap="script/bootstrap"
Expand Down
23 changes: 23 additions & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ config ()
# Individual names can be quoted to avoid word splitting.
: ${SCHEMES:=$(xcodebuild -list -project "$XCODEPROJ" 2>/dev/null | awk -f "$SCRIPT_DIR/schemes.awk")}

# A whitespace-separated list of executables that must be present and locatable.
: ${REQUIRED_TOOLS="xctool"}

export XCWORKSPACE
export XCODEPROJ
export BOOTSTRAP
export XCTOOL_OPTIONS
export SCHEMES
export REQUIRED_TOOLS
}

##
Expand All @@ -56,6 +60,12 @@ main ()
{
config

if [ -n "$REQUIRED_TOOLS" ]
then
echo "*** Checking dependencies..."
check_deps
fi

if [ -f "$BOOTSTRAP" ]
then
echo "*** Bootstrapping..."
Expand All @@ -78,6 +88,19 @@ main ()
)
}

check_deps ()
{
for tool in $REQUIRED_TOOLS
do
which -s "$tool"
if [ "$?" -ne "0" ]
then
echo "*** Error: $tool not found. Please install it and bootstrap again."
exit 1
fi
done
}

find_pattern ()
{
ls -d $1 2>/dev/null | head -n 1
Expand Down

0 comments on commit 474f1bb

Please sign in to comment.