kernel-source/get_release_number.sh

10 lines
199 B
Bash

#! /bin/sh
prefix=rc7.
suffix=
commit=ec5a2ef5
[ -n "$suffix" ] || suffix=$2
while [ "$suffix" != "${suffix#[^0-9]*.}" ]; do
suffix=${suffix#[^0-9]*.}
done
echo $prefix$suffix${commit:+_}$commit