Pipe to wc

This commit is contained in:
James Ives 2019-03-04 10:10:49 -05:00
parent 2f61184ad3
commit f8625bcad8

View File

@ -42,7 +42,7 @@ git config --global user.name "${COMMIT_NAME}" && \
# Checks to see if the remote exists prior to deploying.
# If the branch doesn't exist it gets created here as an orphan.
if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH` ]
if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH | wc -l` ]
then
echo "Creating remote branch ${BRANCH} as it doesn't exist..."
git checkout --orphan $BRANCH && \