1 parent a28d6ce commit 52522d0Copy full SHA for 52522d0
1 file changed
amalgamation_version.sh
@@ -1,4 +1,4 @@
1
-#!/usr/bin/env bash
+#!/bin/sh
2
# Used to generate the version for the amalgamation download zip.
3
# https://www.sqlite.org/download.html#encoding
4
# The version is encoded so that filenames sort in order of increasing version number when viewed using "ls".
@@ -7,13 +7,13 @@ version=""
7
i=0
8
export IFS="."
9
for num in $1; do
10
- if [ $i -gt 0 ]; then
11
- if [ $num -le 9 ]; then
12
- eval num=0$num
13
- fi
14
15
- eval version=$version$num
16
- let i+=1
+ if [ $i -gt 0 ]; then
+ case $num in
+ [0-9]) num=0$num ;;
+ esac
+ fi
+ version="${version}${num}"
+ i=$((i+1))
17
done
18
unset IFS
19
if [ $i -gt 3 ]; then
0 commit comments