File: setupDeps.sh

package info (click to toggle)
megaglest 3.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,844 kB
  • ctags: 18,191
  • sloc: cpp: 144,280; ansic: 11,861; sh: 3,233; perl: 1,904; python: 1,751; objc: 142; asm: 42; makefile: 24
file content (51 lines) | stat: -rwxr-xr-x 1,593 bytes parent folder | download | duplicates (4)
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
#!/bin/bash
#
# Use this script to install build dependencies on a number of Linux platforms
# ----------------------------------------------------------------------------
# Originally written by Mark Vejvoda <mark_vejvoda@hotmail.com>
# Rewritten by Tom Reynolds <tomreyn@megaglest.org>
# Copyright (c) 2012-2016 Mark Vejvoda, Tom Reynolds under GNU GPL v3.0

SCRIPTDIR="$(dirname $(readlink -f $0))"

# Load shared functions
. $SCRIPTDIR/../../../mk/linux/mg_shared.sh

echo 'Downloading Javascript libraries...'
wget http://code.jquery.com/jquery-1.12.0.js -O media/jquery-1.12.0.min.js
wget http://www.datatables.net/download/build/jquery.dataTables.min.js -O media/jquery.dataTables.min.js

echo 'Detecting system and installing dependencies...'
# Included from shared functions
detect_system

echo 'We have detected the following system:'
echo ' [ '"$distribution"' ] [ '"$release"' ] [ '"$codename"' ] [ '"$architecture"' ]'

case $distribution in
	SuSE|SUSE?LINUX|Opensuse)
		case $release in
			*)
				echo '(Open)SuSE...'
				sudo zypper install graphviz-perl perl-GraphViz perl-Config-IniFiles perl-PerlMagick
				;;
		esac
		;;

	Debian|Ubuntu|LinuxMint)
		case $release in
			*)
				echo 'Debian / Ubuntu...'
				sudo apt-get install perl graphviz libgraphviz-perl libconfig-inifiles-perl perlmagick
				#sudo apt-get install libimage-size-perl
				;;
		esac
		;;
	*)
		echo 'ERROR: Unknown distribution. Stopping here.' >&2
		exit 1
esac

echo ''
echo 'To create techtree HTML pages copy / edit megapack.ini and run the script:'
echo './convert_faction_xml2html.pl megapack.ini'