Skip to content

Commit 44f34b3

Browse files
committed
update update.sh
1 parent 5177df7 commit 44f34b3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

mytonctrl/scripts/update.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ author="ton-blockchain"
1212
repo="mytonctrl"
1313
branch="master"
1414
srcdir="/usr/src/"
15-
bindir="/usr/bin/"
15+
tmpdir="/tmp/mytonctrl_src/"
1616

1717
# Get arguments
1818
while getopts a:r:b: flag
@@ -28,16 +28,18 @@ done
2828
COLOR='\033[92m'
2929
ENDC='\033[0m'
3030

31-
# Go to work dir
32-
cd ${srcdir}
31+
mkdir -p ${tmpdir}
32+
cd ${tmpdir}
33+
rm -rf ${tmpdir}/${repo}
34+
echo "https://github.com/${author}/${repo}.git -> ${branch}"
35+
git clone --recursive https://github.com/${author}/${repo}.git || exit 1
3336

34-
# uninstall previous version
3537
rm -rf ${srcdir}/${repo}
3638
pip3 uninstall -y mytonctrl
3739

3840
# Update code
39-
echo "https://github.com/${author}/${repo}.git -> ${branch}"
40-
git clone --recursive https://github.com/${author}/${repo}.git
41+
cd ${srcdir}
42+
cp -rf ${tmpdir}/${repo} ${srcdir}
4143
cd ${repo} && git checkout ${branch}
4244
pip3 install -U .
4345

0 commit comments

Comments
 (0)