-
Notifications
You must be signed in to change notification settings - Fork 14
/
install.sh
executable file
·62 lines (54 loc) · 2.24 KB
/
install.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
#!/bin/bash
echo "This script will install Free Oberon."
echo "Free Oberon dependencies are:"
echo " * Allegro5 - for the module Graph and the graphical IDE"
echo " * Git - to download Ofront+"
echo " * GCC - for Ofront+ to compile the generated C-code"
echo
echo "You can find the information on how to install the dependencies in the"
echo "README.md file."
echo
echo "On OS Debian / Ubuntu / Linux Mint and so on:"
echo " sudo apt-get update"
echo " sudo apt-get install -y git gcc libc-dev liballegro5-dev liballegro-image5-dev liballegro-audio5-dev liballegro-acodec5-dev"
echo "or, if sudo is not installed on Debian:"
echo " su"
echo " apt-get update"
echo " apt-get install -y git gcc libc-dev liballegro5-dev liballegro-image5-dev liballegro-audio5-dev liballegro-acodec5-dev"
echo
echo "On OS Fedora:"
echo " sudo dnf install -y git gcc glibc-devel allegro5-devel allegro5-addon-image allegro5-addon-audio allegro5-addon-acodec allegro5-devel allegro5-addon-image-devel allegro5-addon-audio-devel allegro5-addon-acodec-devel"
echo
echo "On Arch Linux:"
echo " sudo pacman -Sy git gcc pkgconf glibc allegro"
echo
echo "On openSUSE:"
echo " sudo zypper install -y git gcc glibc-devel liballegro5_2-devel liballegro_audio5_2-devel liballegro_image5_2-devel liballegro_primitives5_2-devel liballegro_dialog5_2-devel liballegro_acodec5_2-devel liballegro_acodec5_2-devel liballegro_font5_2-devel"
echo
read -p "Are the dependencies installed? [y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "======================="
echo "Downloading Ofront+ if not exists..."
# Only run git command if dot-git subdirectory exists
[ -d ".git" ] && git submodule update --init
echo "======================="
echo "Building Ofront+..."
cd Data/bin/OfrontPlus/Target/Linux_amd64/Bin
./build
cd ../../../../../..
echo "======================="
echo "Building Free Oberon..."
cd src
./make.sh
cd ..
echo "======================="
if [ -f "./FreeOberon" ]; then
echo "Free Oberon is installed. You can now run: ./FreeOberon"
echo "Add the following line to ~/.bashrc to use the command 'fob':"
echo "export PATH=$PWD:\$PATH"
else
echo "An error occurred while setting up Free Oberon."
echo "Please check your dependencies."
fi
fi