Skip to content

Commit

Permalink
Make build.sh friendlier
Browse files Browse the repository at this point in the history
- Use version variables for dependencies.
- Align with other projects.
  • Loading branch information
mchack-work committed Dec 12, 2023
1 parent 01f5cb7 commit 08591ac
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
#! /bin/sh

LIBDIR=../tkey-libs
tkey_libs_version="v0.0.1"
signer_version="v0.0.7"

git clone -b v0.0.1 https://github.com/tillitis/tkey-libs.git ../tkey-libs
git clone -b v0.0.7 https://github.com/tillitis/tkey-device-signer.git ../tkey-device-signer
printf "Building tkey-libs with version: %s\n" "$tkey_libs_version"
printf "Building signer with version: %s\n" "$signer_version"

if [ -d ../tkey-libs ]
then
(cd ../tkey-libs; git checkout main; git pull; git checkout "$tkey_libs_version")
else
git clone -b "$tkey_libs_version" https://github.com/tillitis/tkey-libs.git ../tkey-libs
fi

if [ -d ../tkey-device-signer ]
then
(cd ../tkey-device-signer; git checkout main; git pull; git checkout "$signer_version")
else
git clone -b "$signer_version" https://github.com/tillitis/tkey-device-signer.git ../tkey-device-signer
fi

make -j -C ../tkey-libs
make -j -C ../tkey-device-signer
Expand Down

0 comments on commit 08591ac

Please sign in to comment.