Skip to content

Commit

Permalink
Allowing teamid script to receive ID as its first argument
Browse files Browse the repository at this point in the history
  • Loading branch information
insidegui committed May 29, 2023
1 parent 3c93230 commit 957a832
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions teamid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

TEAM_ID_FILE=WWDC/TeamID.xcconfig

echo "What is your Apple Developer Team ID? (looks like 1A23BDCD)"
read TEAM_ID
if [ -z "$1" ]; then
echo "What is your Apple Developer Team ID? (looks like 1A23BDCD)"
read TEAM_ID

if [ -z "$TEAM_ID" ]; then
echo "You must enter a team id"
exit 1
if [ -z "$TEAM_ID" ]; then
echo "You must enter a team id"
exit 1
fi
else
TEAM_ID=$1
fi

echo "Setting team ID to $TEAM_ID"

echo "// This file was automatically generated, do not edit directly." > $TEAM_ID_FILE
echo "" >> $TEAM_ID_FILE
echo "DEVELOPMENT_TEAM=$TEAM_ID" >> $TEAM_ID_FILE
Expand Down

0 comments on commit 957a832

Please sign in to comment.