File tree 1 file changed +16
-6
lines changed
1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
VERSION=$1
4
4
5
+ if [ -z " ${VERSION} " ]; then
6
+ echo >&2 " Fatal error: VERSION not set"
7
+ echo >&2 " Fatal error: Need to provide version, example: 5.62.0"
8
+ exit 2
9
+ fi
10
+
11
+ CBMC_STRING=" CbmcAT"
12
+ VERSION_PROCESSED=" ${VERSION// ./ } "
13
+ FORMULA_VERSION=" $CBMC_STRING$VERSION_PROCESSED "
14
+
5
15
for TAG in " arm64_monterey" " arm64_big_sur" " monterey" " big_sur" " catalina" " x86_64_linux"
6
16
do
7
17
echo " Processing bottle for $VERSION -- $TAG "
17
27
18
28
tar -xzf $BOTTLE_NAME
19
29
mv cbmc cbmc@$1
20
- sed -iu ' s/class Cbmc/class CbmcAT5610/g ' cbmc@$1 /$1 /.brew/cbmc.rb
21
- tar czf cbmc- $1 -$TAG .bottle.tar.gz cbmc@$1
30
+ sed -iu " s/class Cbmc/class $FORMULA_VERSION /g " cbmc@$1 /$1 /.brew/cbmc.rb
31
+ tar czf cbmc@ $1 -$1 . $TAG .bottle.tar.gz cbmc@$1
22
32
rm -rf cbmc@$1
23
- SHA=$( shasum -a 256 cbmc- $1 -$TAG .bottle.tar.gz)
33
+ SHA=$( shasum -a 256 cbmc@ $1 -$1 . $TAG .bottle.tar.gz)
24
34
echo " $SHA "
25
35
elif [[ $OUTPUT =~ $pat2 ]]; then
26
36
BOTTLE_NAME=${BASH_REMATCH[1]}
27
37
BOTTLE_NAME+=" tar.gz"
28
38
29
39
tar -xzf $BOTTLE_NAME
30
40
mv cbmc cbmc@$1
31
- sed -iu ' s/class Cbmc/class CbmcAT5610/g ' cbmc@$1 /$1 /.brew/cbmc.rb
32
- tar czf cbmc- $1 -$TAG .bottle.tar.gz cbmc@$1
41
+ sed -iu " s/class Cbmc/class $FORMULA_VERSION /g " cbmc@$1 /$1 /.brew/cbmc.rb
42
+ tar czf cbmc@ $1 -$1 . $TAG .bottle.tar.gz cbmc@$1
33
43
rm -rf cbmc@$1
34
- SHA=$( shasum -a 256 cbmc- $1 -$TAG .bottle.tar.gz)
44
+ SHA=$( shasum -a 256 cbmc@ $1 -$1 . $TAG .bottle.tar.gz)
35
45
echo " $SHA "
36
46
fi
37
47
done
You can’t perform that action at this time.
0 commit comments