From e15ee8f5c07fab4da8a558433605d2f036288386 Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Wed, 8 Mar 2017 11:23:04 -0800 Subject: [PATCH] style: cleaned up comments --- src/scripts/npm/updateIosSdk.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/scripts/npm/updateIosSdk.sh b/src/scripts/npm/updateIosSdk.sh index 7a133115..a69caacf 100755 --- a/src/scripts/npm/updateIosSdk.sh +++ b/src/scripts/npm/updateIosSdk.sh @@ -1,30 +1,30 @@ #!/bin/bash #update the ios dependencies in this directory to those storied under passed tag on github +# update the iOS dependencies in this directory to those storied under passed tag on Github -#fail fast on errors +# fail fast on errors set -e -#cd into directory containing this script +# cd into directory containing this script cd "$(dirname "$0")" -#check first parameter is set to tag to download if [ -z ${1+x} ]; then echo "You must pass this script the tag to download" exit -1 +# check first parameter is set to tag to download else echo "downloading tag '$1'" fi -#this is the git tag that we'll be updating to, -#we expecct it to be the first parameter to this script +# this is the git tag that we will be updating to +# we expect it to be the first parameter to this script tag_name=$1 tag_url="https://github.com/BranchMetrics/ios-branch-deep-linking/archive/$tag_name.zip" -#extract is where we stick the extracted archive of the tag -tag_extract=ios-branch-deep-linking-$tag_name +# extract is where we stick the extracted archive of the tag +tag_extract=ios-branch-deep-linking-$tag_name -#check that tag exists tag_url_status=`curl -L -o /dev/null --silent --head --write-out '%{http_code}\n' $tag_url` if [ $tag_url_status = "200" ]; then echo "found tag" @@ -34,29 +34,31 @@ else exit -1 fi -#this will overwripte existing versions of sdk.zip curl -L -o sdk.zip $tag_url #delete old extracted content or do nothing if we don't have any rm -rf $tag_extract +# this will overwrite existing versions of sdk.zip -#silently (-q) extract download unzip -q -x sdk.zip rm -f sdk.zip +# delete old extracted content or do nothing if we don't have any -#copy in new dependencies rm -rf Branch-SDK mv $tag_extract/Branch-SDK/Branch-SDK . +# silently (-q) extract download rm -rf Branch.framework mv $tag_extract/Branch.framework . +# remove rm -rf Fabric mv $tag_extract/Branch-SDK/Fabric . +# copy in new dependencies -#clean up rm -rf $tag_extract +# clean up extract #replace all instances of '#import "../Fabric/' with '#import "' in .m files find . -type f -name '*.m' \ - -exec perl -i -pe 's/\#import \"\.\.\/Fabric\//#import "/' '{}' + + -exec perl -i -pe 's/\#import \"\.\.\/Fabric\//#import "/' '{}' + \ No newline at end of file