diff etc/setup_as_root.sh @ 0:7d34f4b6df69

Initial check-in (partial)
author samer
date Sun, 18 Jan 2015 16:18:01 +0000
parents
children bf3354229297
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/setup_as_root.sh	Sun Jan 18 16:18:01 2015 +0000
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+echo 'THIS IS NOT READY YET!'
+exit 1
+# ---------------------- CONFIGURATION PART ----------------------
+
+HAVE_MATLAB=yes
+SWI_GUI=no
+
+# ------------------- END OF CONFIGURATION PART ------------------
+# APT GET installs
+apt-get install build-essential autoconf mercurial git pkg-config
+apt-get install libossp-uuid-dev libssl-dev zlib1g-dev unixodbc-dev libsmf-dev libsqlite3-dev
+apt-get install graphviz lilypond pdf2svg texlive-font-utils p7zip-full
+apt-get install vorbis-tools lame sox faad flac libsox-fmt-all fluidsynth
+
+# Only if you want SWI Prolog GUI
+#sudo apt-get install libxpm-dev libxt-dev libjpeg-dev libx11-dev libxft-dev libxinerama1 libfontconfig1-dev
+
+# If you have MATLAB
+if [ $HAVE_MATLAB == yes ]; then
+	MATLAB_ROOT=$(matlab -e | grep '^MATLAB=')
+	apt-get csh libtritonus-java libvorbisspi-java libmp3spi-java
+	ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64
+	ln -s $(MATLAB_ROOT)/bin/matlab /usr/local/bin 
+
+	# MATLAB (R2012a at least) looks for Java extension jars in this directory
+	mkdir -p /usr/java/packages/lib/ext
+	# NB - there may be some duplication of service providers here - I'm not sure
+	# which of them works best.
+	ln -s /usr/shara/java/{vorbisspi,mp3spi}.jar /usr/java/packages/lib/ext
+	ln -s /usr/shara/java/tritonus_{aos,core,jorbis,mp3,remaining,share}.jar /usr/java/packages/lib/ext
+
+	# need to add native library paths to this file
+	if [ ! grep '/usr/lib/jni' $(MATLAB_ROOT)/toolbox/local/librarypath.txt ]; then
+		echo '/usr/lib/jni' >> $(MATLAB_ROOT)/toolbox/local/librarypath.txt
+	end
+fi
+
+#if [ -x ~dml/.boot ]; then
+#   sudo -u dml -H mkdir -p ~dml/var/log
+#   sudo -u dml -H bash -l -c '~/.boot >> ~/var/log/boot.log'
+#fi
+
+if $SETUP_X; then
+	if $HEADLESS; then
+		apt-get install xinit xserver-xorg-video-dummy
+		cp ~/etc/xorg.conf /etc/X11
+	else
+		apt-get install xinit blackbox
+	fi
+
+	dpkg-reconfigure x11-common
+fi