sbt/bin/util.sh

15 lines
265 B
Bash
Raw Normal View History

2011-04-03 03:08:04 +02:00
#!/usr/bin/env bash
#
function camelCase () {
# pretty sad having to resort to this in 2011
SED=""
if [ -f /usr/local/bin/gsed ]; then
SED=/usr/local/bin/gsed
else
SED=sed
fi
echo $1 | $SED -e 's/[-_]\([a-z]\)/\u\1/g' | $SED -e 's/^./\u&/;'
}