radare2/sys/vala.sh

51 lines
838 B
Bash
Raw Normal View History

#!/bin/sh
[ -z "${PREFIX}" ] && PREFIX=/usr
# find root
2015-06-17 02:19:48 +00:00
cd "$(dirname "$PWD/$0")"
2014-11-20 09:06:09 +00:00
. ./CONFIG
mkdir -p _work
cd _work
2015-04-17 19:56:01 +00:00
ccache --help > /dev/null 2>&1
if [ $? = 0 ]; then
[ -z "${CC}" ] && CC=gcc
CC="ccache ${CC}"
export CC
fi
2016-05-19 02:11:10 +00:00
#valac --help > /dev/null 2>&1
#if [ ! $? = 0 ]; then
# must install from tarball
2016-05-19 02:12:19 +00:00
VV=0.32.0
SV=$(echo ${VV}|cut -d . -f 1,2)
if [ ! -d vala-${VV} ]; then
2016-05-19 02:12:19 +00:00
wget "http://download.gnome.org/sources/vala/${SV}/vala-${VV}.tar.xz"
tar xJvf vala-${VV}.tar.xz
fi
2015-06-17 02:19:48 +00:00
cd vala-${VV} || exit 1
2016-05-19 02:11:10 +00:00
./configure --prefix="${PREFIX}" || exit 1
make || exit 1
sudo make install || exit 1
cd ..
2016-05-19 02:11:10 +00:00
#fi
exit 0
# git install
if [ -d vala ]; then
cd vala
#sudo make uninstall
git pull
else
git clone git://git.gnome.org/vala
cd vala
fi
sh autogen.sh --prefix="${PREFIX}" && \
make -j 4 && \
sudo make install
cd ..