Skip to content

Commit a7c6c02

Browse files
committed
update upgrade.sh
1 parent 44f34b3 commit a7c6c02

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mytonctrl/scripts/upgrade.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repo="ton"
1313
branch="master"
1414
srcdir="/usr/src/"
1515
bindir="/usr/bin/"
16+
tmpdir="/tmp/ton_src/"
1617

1718
# Get arguments
1819
while getopts a:r:b: flag
@@ -59,13 +60,18 @@ else
5960
opensslPath=${bindir}/openssl_3
6061
fi
6162

63+
rm -rf ${tmpdir}/${repo}
64+
mkdir -p ${tmpdir}/${repo}
65+
cd ${tmpdir}/${repo}
66+
echo "https://github.com/${author}/${repo}.git -> ${branch}"
67+
git clone --recursive https://github.com/${author}/${repo}.git . || exit 1
68+
6269
# Go to work dir
6370
cd ${srcdir}/${repo}
6471
ls -A1 | xargs rm -rf
6572

6673
# Update code
67-
echo "https://github.com/${author}/${repo}.git -> ${branch}"
68-
git clone --recursive https://github.com/${author}/${repo}.git .
74+
cp -rfT ${tmpdir}/${repo} .
6975
git checkout ${branch}
7076

7177
git submodule sync --recursive

0 commit comments

Comments
 (0)