Skip to content
Snippets Groups Projects
nibbuild.sh 543 B
Newer Older
EthanRDoesMC's avatar
EthanRDoesMC committed
#!/bin/sh

#  nibbuild.sh
#  brooklyn
#
#  Created by EthanRDoesMC on 1/1/21.
EthanRDoesMC's avatar
EthanRDoesMC committed
#

# make sure this is macos
if [[ "$OSTYPE" == "darwin"* ]]; then
# our xibs are in resources
EthanRDoesMC's avatar
EthanRDoesMC committed
cd ./Resources
EthanRDoesMC's avatar
EthanRDoesMC committed
# build xib with xcode-only ibtool
echo "Building xibs"
EthanRDoesMC's avatar
EthanRDoesMC committed
find . -name "*.xib" -type f | awk '{sub(/.xib/,"");print}' | xargs -I % ibtool --compile %.nib %.xib
EthanRDoesMC's avatar
EthanRDoesMC committed
else
    echo "Not macOS. Xibs will not be built."
    echo "If changes have been made to Xibs but nibs are not up-to-date: compile with macOS, then make sure to commit and push the nib files."
fi