-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
65 lines (52 loc) · 1.09 KB
/
install.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
#!/bin/bash
_testIfFileExist()
{
filelist=$(ls -la ~/)
for filename in $filelist
do
if [[ $1 == $filename ]]
then
return 1
fi
done
return 0
}
_testIfFileToolExist()
{
filelist=`ls /usr/local/bin`
for filename in $filelist
do
if [[ $1 == $filename ]]
then
return 1
fi
done
return 0
}
_testIfFileExist ".reactComponentSample"
result=$?
if [[ $result == 1 ]]
then
sudo rm -r ~/.reactComponentSample
fi
cp -fr bin/reactComponentSample ~/.reactComponentSample
_testIfFileToolExist "react-ninjamer-tools"
result=$?
if [[ $result == 1 ]]
then
sudo rm -r /usr/local/bin/react-ninjamer-tools
fi
sudo cp ./bin/react-ninjamer-tools /usr/local/bin
sudo chmod 755 /usr/local/bin/react-ninjamer-tools
echo
echo "-------------------------------------------"
echo " React Ninjamer Tools "
echo "-------------------------------------------"
echo
echo " Installation successful "
echo
echo " ---------------------> run react-ninjamer-tools for help ! "
echo
echo " Have a good time hacking my ninja ! "
echo
#export PATH=$PATH:~/.react-ninjamer-tools