Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

Commit

Permalink
add a setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
jurre committed Jul 10, 2014
1 parent 2e51828 commit 06f8944
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -10,12 +10,11 @@ PunchClock is an in/out tracking app for iOS 7+ that uses iBeacon and Geofencing
Building
--------

In order to build PunchClock you'll need to do a few things:
In order to build PunchClock you'll need run the install script:

- `$ cp PunchClock/constants.h.sample PunchClock/constants.h`
- `$ cp PunchClock/PunchClock_Beta.xcconfig.sample PunchClock/PunchClock_Beta.xcconfig`
- `$ cp PunchClock/PunchClock_Debug.xcconfig.sample PunchClock/PunchClock_Debug.xcconfig`
- `$ pod install`
- `$ ./setup`

This script sets up a `constants.h` file, two **.xcconfig** files and runs `pod install`

The `constants.h` file will need to be customized for your environment. It's meant to allow you to run PunchClock against a local copy of the server during development and a production server after release. If you don't plan to use the Hockey or push notifications you can set those things to nil.

Expand Down
22 changes: 22 additions & 0 deletions setup
@@ -0,0 +1,22 @@
#!/usr/bin/env sh

if [ ! -f PunchClock/constants.h ]; then
cp PunchClock/constants.h.sample PunchClock/constants.h
echo "Copied PunchClock/constants.h.sample to PunchClock/constants.h"
fi

if [ ! -f PunchClock/PunchClock_Beta.xcconfig ]; then
cp PunchClock/PunchClock_Beta.xcconfig.sample PunchClock/PunchClock_Beta.xcconfig
echo "Copied PunchClock/PunchClock_Beta.xcconfig.sample to PunchClock/PunchClock_Beta.xcconfig"
fi

if [ ! -f PunchClock/PunchClock_Debug.xcconfig ]; then
cp PunchClock/PunchClock_Debug.xcconfig.sample PunchClock/PunchClock_Debug.xcconfig
echo "Copied PunchClock/PunchClock_Debug.xcconfig.sample to PunchClock/PunchClock_Debug.xcconfig"
fi

if hash pod >/dev/null; then
pod install
else
echo "Cocoapods is not available in your path, make sure you have it installed and run this script again"
fi

0 comments on commit 06f8944

Please sign in to comment.