summaryrefslogtreecommitdiff
path: root/scripts/uni-get-dependencies.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-12-21 19:59:35 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-12-21 19:59:35 (GMT)
commit870f3dcd2d20362995308cd2829c8d7ba61cf623 (patch)
tree3012a4714c58d7b5749a0882ec29287d980a7652 /scripts/uni-get-dependencies.sh
parentb1ecf351347d83830a546d3d6c49eafc6781634b (diff)
deal with situation where gcc doesnt exist. add mageia urpmi commands. shorten os detect code
Diffstat (limited to 'scripts/uni-get-dependencies.sh')
-rwxr-xr-xscripts/uni-get-dependencies.sh28
1 files changed, 22 insertions, 6 deletions
diff --git a/scripts/uni-get-dependencies.sh b/scripts/uni-get-dependencies.sh
index 09c8181..03aecfb 100755
--- a/scripts/uni-get-dependencies.sh
+++ b/scripts/uni-get-dependencies.sh
@@ -1,3 +1,5 @@
+# auto-install dependency packages using the systems package manager.
+# after running this, run ./script/check-dependencies.sh. see README.md
get_fedora_deps()
{
@@ -21,6 +23,18 @@ get_opensuse_deps()
libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel
}
+get_mageia_deps()
+{
+ pklist="task-c-devel task-c++-devel"
+ pklist="$pklist libqt4-devel libgmp-devel libmpfr-devel"
+ pklist="$pklist libboost-devel eigen3-devel"
+ pklist="$pklist bison flex"
+ pklist="$pklist cmake imagemagick python curl git"
+ # cgal + opencsg don't exist
+ sudo urpmi ctags
+ sudo urpmi $pklist
+}
+
get_debian_deps()
{
echo "Tested on Ubuntu 12.04"
@@ -38,18 +52,20 @@ get_debian_deps()
}
-if [ "`cat /etc/issue | grep -i ubuntu`" ]; then
+if [ "`grep -i ubuntu /etc/issue`" ]; then
get_debian_deps
-elif [ "`cat /etc/issue | grep -i debian`" ]; then
+elif [ "`grep -i debian /etc/issue`" ]; then
get_debian_deps
-elif [ "`cat /etc/issue | grep -i opensuse`" ]; then
+elif [ "`grep -i suse /etc/issue`" ]; then
get_opensuse_deps
-elif [ "`cat /etc/issue | grep -i freebsd`" ]; then
+elif [ "`grep -i freebsd /etc/issue`" ]; then
get_freebsd_deps
-elif [ "`cat /etc/issue | grep -i fedora`" ]; then
+elif [ "`grep -i fedora /etc/issue`" ]; then
get_fedora_deps
-elif [ "`cat /etc/issue | grep -i redhat`" ]; then
+elif [ "`grep -i redhat /etc/issue`" ]; then
get_fedora_deps
+elif [ "`grep -i mageia /etc/issue`" ]; then
+ get_mageia_deps
else
echo "Unknown system type. Please install the dependency packages listed"
echo "in README.md using your system's package manager."
contact: Jan Huwald // Impressum