exynos-linux-stable/scripts/android-major-version.sh

10 lines
195 B
Bash
Raw Permalink Normal View History

#!/bin/sh
MAJOR=$(echo $1 | cut -d '.' -f 1)
if echo $MAJOR | egrep -q '^[0-9]+$'; then
let MAJOR=MAJOR+103
printf "%b" "$(printf '\%03o' $MAJOR)"
else
echo $MAJOR | tr '[A-Z]' '[a-z]'
fi