Skip to content
Permalink
2241e43994
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 20 lines (17 sloc) 369 Bytes
#! /bin/bash
max=0
max_name=""
cd /src/mariux/beeroot/bee-files/
for f in linux-[0-9]*.bee; do
[[ $f =~ -([0-9]+).bee ]] || continue
if (( ${BASH_REMATCH[1]} > $max )); then
max=${BASH_REMATCH[1]}
max_name="$f"
fi
done
if [ -n "$max_name" ]; then
echo $(($max+1))
else
echo "No file linux-[0-9]*.bee found in /src/mariux/beeroot/bee-files/" >&1
exit 1
fi