Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions mytonctrl/scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ author="ton-blockchain"
repo="mytonctrl"
branch="master"
srcdir="/usr/src/"
bindir="/usr/bin/"
tmpdir="/tmp/mytonctrl_src/"

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

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

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

# Update code
echo "https://github.com/${author}/${repo}.git -> ${branch}"
git clone --recursive https://github.com/${author}/${repo}.git
cd ${srcdir}
cp -rf ${tmpdir}/${repo} ${srcdir}
cd ${repo} && git checkout ${branch}
pip3 install -U .

Expand Down
10 changes: 8 additions & 2 deletions mytonctrl/scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repo="ton"
branch="master"
srcdir="/usr/src/"
bindir="/usr/bin/"
tmpdir="/tmp/ton_src/"

# Get arguments
while getopts a:r:b: flag
Expand Down Expand Up @@ -59,13 +60,18 @@ else
opensslPath=${bindir}/openssl_3
fi

rm -rf ${tmpdir}/${repo}
mkdir -p ${tmpdir}/${repo}
cd ${tmpdir}/${repo}
echo "https://github.com/${author}/${repo}.git -> ${branch}"
git clone --recursive https://github.com/${author}/${repo}.git . || exit 1

# Go to work dir
cd ${srcdir}/${repo}
ls -A1 | xargs rm -rf

# Update code
echo "https://github.com/${author}/${repo}.git -> ${branch}"
git clone --recursive https://github.com/${author}/${repo}.git .
cp -rfT ${tmpdir}/${repo} .
git checkout ${branch}

git submodule sync --recursive
Expand Down