-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdate_install_ui.sh
90 lines (66 loc) · 1.57 KB
/
update_install_ui.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh
echo ""
echo "Updating APT and installing curl"
apt update && apt install curl -y
echo ""
echo "stopping node.js if running"
killall -9 node*
echo ""
echo "Installing NPM (Node Package Manager) if not already installed"
apt install npm
echo ""
echo "NodeJS version if installed (or to be updated)"
node -v
echo ""
#echo "Forcing system to recognize npm/curl changes via unseen terminal command"
#echo "This avoids having to restart the terminal rendering this process moot"
#. ~/.profile
#echo ""
echo "Clear NPM Cache"
npm cache clean -f
echo ""
echo "Installing yarn package manager"
npm install -g yarn
echo ""
echo "Installing Node's version manager 'n'"
npm install -g n
echo ""
echo "Installing most recent stable node.js release"
sudo n stable
echo ""
echo "stopping node.js if running"
killall -9 node*
echo ""
echo "removing old files"
rm -R UI
echo ""
echo "cloning git repositories for Qortal UI"
git clone https://github.com/qortal/UI
echo ""
cd UI
cd qortal-ui
echo "installing dependencies and linking with yarn link for build process"
yarn install
cd ../qortal-ui-core
yarn install
# Break any previous links
yarn unlink
yarn link
cd ../qortal-ui-crypto
yarn install
# Break any previous links
yarn unlink
yarn link
cd ../qortal-ui-plugins
yarn install
# Break any previous links
yarn unlink
yarn link
cd ../qortal-ui
yarn link qortal-ui-core
yarn link qortal-ui-crypto
yarn link qortal-ui-plugins
echo "starting build process...this may take a while...please be patient!"
yarn run build
echo ""
echo "BUILD COMPLETE! You can now make use of the new UI!"