|
@@ -33,8 +33,8 @@ last=$(git log -1 --pretty=%s)
|
|
|
[[ ${#last} -eq 9 ]] || error "Incorrect last commit name length \"$last\"!"
|
|
[[ ${#last} -eq 9 ]] || error "Incorrect last commit name length \"$last\"!"
|
|
|
[[ ${last:0:6} == "commit" ]] || error "Incorrect last commit name \"$last\"!"
|
|
[[ ${last:0:6} == "commit" ]] || error "Incorrect last commit name \"$last\"!"
|
|
|
|
|
|
|
|
-# Last commit number
|
|
|
|
|
-lcn=${last:6:9}
|
|
|
|
|
|
|
+# Last commit number, also remove leading zeros
|
|
|
|
|
+lcn=${last:6:9} | sed 's/^0*//'
|
|
|
|
|
|
|
|
# Check if integer
|
|
# Check if integer
|
|
|
[[ $lcn =~ ^-?[0-9]+$ ]] || error "Incorrect last commit number \"$last\"!"
|
|
[[ $lcn =~ ^-?[0-9]+$ ]] || error "Incorrect last commit number \"$last\"!"
|