This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
install_easyckan.sh
executable file
·79 lines (62 loc) · 2.83 KB
/
install_easyckan.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
echo "# ======================================================== #"
echo "# == Welcome to Easy CKAN installation == #"
echo "# ======================================================== #"
echo ""
# Install Docker and main dependences
# ==============================================
echo "# ======================================================== #"
echo "# == Installing Docker and main dependences == #"
echo "# ======================================================== #"
# Envs for package manager
YUM_CMD=$(which yum)
APT_GET_CMD=$(which apt-get)
if [[ ! -z $YUM_CMD ]]; then
yum install -y curl sudo git
elif [[ ! -z $APT_GET_CMD ]]; then
apt-get update
apt-get install -y curl sudo git
else
echo "Your distro is not compatible! Check https://github.com/thenets/Easy-CKAN"
echo "Exiting..."
exit 1;
fi
if ! [ -x "$(command -v docker)" ]; then
su -c "curl -sSL https://get.docker.com/ | sh"
usermod -aG docker $(grep 1000 /etc/passwd | cut -f1 -d:)
fi
# Install command line tools
# ==============================================
echo "# ======================================================== #"
echo "# == Installing Easy CKAN command line tools == #"
echo "# ======================================================== #"
su -c "sleep 1"
# Remove old content
rm -Rf /etc/easyckan/ 2> /dev/null
rm -Rf /usr/bin/easyckan 2> /dev/null
# Copying folders
cd /tmp
rm -rf ./Easy-CKAN
git clone -b dev https://github.com/thenets/Easy-CKAN.git
mv /tmp/Easy-CKAN/ /etc/easyckan/
# Add easyckan to path
ln -s /etc/easyckan/bin/easyckan /usr/bin/easyckan
echo "... done!"
# Finish
# ==============================================
echo ""
echo "# ======================================================== #"
echo "# == Easy CKAN == #"
echo "# ======================================================== #"
echo "| If you have any question or need support, talk with me |"
echo "| at https://webchat.freenode.net at channel #easyckan. |"
echo "| |"
echo "| If you find bugs, please open a issue on: |"
echo "| https://github.com/thenets/Easy-CKAN |"
echo "| |"
echo "| Run the following command to learn how to use: |"
echo "| # sudo easyckan help |"
echo "| |"
echo "| |"
echo "| Luiz Felipe F M Costa |"
echo "| TheNets.org |"
echo "# ======================================================== #"