chaosflix/.circleci/getVersionCode.sh
2019-05-04 23:52:03 +02:00

9 lines
No EOL
232 B
Bash
Executable file

#!/bin/sh
COUNT=$(git rev-list --count HEAD | tr -d '\n\r')
if [ $(expr $COUNT % 2) -ne 0 ]; then
COUNT=$(expr $COUNT - 1)
fi
case $1 in
--touch|-t|touch) printf $COUNT ;;
--leanback|-l|leanback) printf $(expr $COUNT - 1) ;;
esac