Skip to content

Commit 6cc6705

Browse files
authored
Merge pull request #346 from neodix42/fix-docker-ton-upgrade
Fix ton upgrade when mytonctrl is used inside the docker.
2 parents d57e793 + 9eef34f commit 6cc6705

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

mytonctrl/scripts/upgrade.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,25 @@ else
4848
systemctl daemon-reload
4949
fi
5050

51-
# compile openssl_3
52-
rm -rf ${bindir}/openssl_3
53-
git clone https://github.com/openssl/openssl ${bindir}/openssl_3
54-
cd ${bindir}/openssl_3
55-
git checkout openssl-3.1.4
56-
./config
57-
make build_libs -j$(nproc)
58-
opensslPath=`pwd`
51+
if [ ! -d "${bindir}/openssl_3" ]; then
52+
git clone https://github.com/openssl/openssl ${bindir}/openssl_3
53+
cd ${bindir}/openssl_3
54+
git checkout openssl-3.1.4
55+
./config
56+
make build_libs -j$(nproc)
57+
opensslPath=`pwd`
58+
else
59+
opensslPath=${bindir}/openssl_3
60+
fi
5961

6062
# Go to work dir
61-
cd ${srcdir}
62-
rm -rf ${srcdir}/${repo}
63+
cd ${srcdir}/${repo}
64+
ls -A1 | xargs rm -rf
6365

6466
# Update code
6567
echo "https://github.com/${author}/${repo}.git -> ${branch}"
66-
git clone --branch ${branch} --recursive https://github.com/${author}/${repo}.git
67-
cd ${repo}
68+
git clone --branch ${branch} --recursive https://github.com/${author}/${repo}.git .
69+
6870
export CC=/usr/bin/clang
6971
export CXX=/usr/bin/clang++
7072
export CCACHE_DISABLE=1

0 commit comments

Comments
 (0)