Update INSTALL
[zik.git] / dependencies
blob288885bce0db3fe81b159a9a423a3a03bd14c021
1 #!/bin/sh
2 #Try to check if ZiK's dependencies are installed.
4 EXIT=0
5 #################################
6 #Checking for global dependencies
7 #################################
8 echo -ne "Checking global dependencies:\n"
10 echo -ne "Checking env.."
11 TEST=0
12 (env --version) &> /dev/null || {
13 echo -ne "Error\nYou have to install env.\nhttp://www.gnu.org/software/coreutils/\n"
14 TEST=1
15 EXIT=1
17 if test "$TEST" -eq 0
18 then
19 (test -f /usr/bin/env) || {
20 echo -ne "Error\nenv is not installed in /usr/bin.\nTry a symbolic link."
21 TEST=1
22 EXIT=1
25 if test "$TEST" -eq 0
26 then
27 echo -ne "Ok.\n"
30 echo -ne "Checking ruby.."
31 TEST=0
32 (ruby --version) &> /dev/null || {
33 echo -ne "Error\nRuby is not installed.\nhttp://www.ruby-lang.org/"
34 TEST=1
35 EXIT=1
37 if test "$TEST" -eq 0
38 then
39 echo -ne "Ok.\n"
42 if test "$EXIT" -eq 1
43 then
44 echo -ne "You should install the required dependencies and run this script once more\n\nERROR\n\n"
45 exit 1
47 #############################
48 #Checking for ruby librairies
49 #############################
50 echo -ne "Checking ruby librairies:\n"
52 echo -ne "Checking gst0.10.."
53 TEST=0
54 (ruby -e "require 'gst0.10'") || {
55 echo -ne "Error\nCannot find ruby-gstreamer0.10\nhttps://trac.luon.net/ruby-gstreamer0.10\n"
56 TEST=1
57 EXIT=1
59 if test "$TEST" -eq 0
60 then
61 echo -ne "Ok.\n"
64 echo -ne "Checking gtk2.."
65 TEST=0
66 (ruby -e "require 'gtk2'") || {
67 echo -ne "Error\nCannot find ruby-gtk2\nhttp://ruby-gnome2.sourceforge.jp/\n"
68 TEST=1
69 EXIT=1
71 if test "$TEST" -eq 0
72 then
73 echo -ne "Ok.\n"
76 echo -ne "Checking taglib.."
77 TEST=0
78 (ruby -e "require 'taglib'") || {
79 echo -ne "Error\nCannot find ruby-taglib\nhttp://www.hakubi.us/ruby-taglib/\n"
80 TEST=1
81 EXIT=1
83 if test "$TEST" -eq 0
84 then
85 echo -ne "Ok.\n"
88 echo -ne "Checking gettext.."
89 TEST=0
90 (ruby -e "require 'gettext'") || {
91 echo -ne "Error\nCannot find ruby-gettext-package\nhttp://rubyforge.org/projects/gettext\n"
92 TEST=1
93 EXIT=1
95 if test "$TEST" -eq 0
96 then
97 echo -ne "Ok.\n"
100 if test "$EXIT" -eq 1
101 then
102 echo -ne "You should install the required dependencies.\n\nERROR\n\n"
103 exit 1
106 exit 0