-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-dependencies.sh
executable file
·50 lines (44 loc) · 1.17 KB
/
install-dependencies.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
#!/bin/bash
if [ -e "dependencies" ]
then
echo "Dependencies directory already exists. Do you want to rebuild them? (y/n)"
result=false
while [ true ]
do
read answer
if [ $answer == 'y' ]
then
result=true
break
elif [ $answer == 'n' ]
then
result=false
break
else
echo "Answer not one of the options y/n."
fi
done
if [ $result == true ]
then
rm -r dependencies
else
exit 0
fi
fi
git clone -b develop --depth=1 https://github.com/electronpass/libelectronpass-cpp.git libelectronpass-build
cd libelectronpass-build
chmod +x install-cryptopp.sh
./install-cryptopp.sh
mkdir build
cd build
cmake ..
make electronpass -j4
cd ../..
mkdir dependencies
mkdir -p dependencies/electronpass
mkdir -p dependencies/cryptopp
mv libelectronpass-build/include/* dependencies/electronpass/
mv libelectronpass-build/cryptopp/cryptopp/* dependencies/cryptopp/
mv libelectronpass-build/lib/libelectronpass.a dependencies/libelectronpass.a
mv libelectronpass-build/cryptopp/libcryptopp.a dependencies/libcryptopp.a
rm -rf libelectronpass-build