Skip to content

Instantly share code, notes, and snippets.

@slangley
Created September 17, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slangley/5fa867a990404d4bf696 to your computer and use it in GitHub Desktop.
Save slangley/5fa867a990404d4bf696 to your computer and use it in GitHub Desktop.
Wrapper around SBConstants that warns if not installed.
#!/bin/bash
SWIFT_ARGS=
while getopts w opt; do
case $opt in
w)
SWIFT_ARGS='-w'
;;
esac
done
shift $((OPTIND-1))
sbconstantsPath=`which sbconstants`
echo ${sbconstantsPath}
if [[ ! -f ${sbconstantsPath} || -z ${sbconstantsPath} ]]; then
echo "WARNING: Skipping Storyboard Constants generation. Install sbconstants to make things easier
gem install sbconstants
https://github.com/paulsamuels/SBConstants"
exit 0;
fi
sbconstants $SWIFT_ARGS $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment