fb:porticula NoPaste
FreeBASIC-0.24.0-linux.sh
Uploader: | darksider3 |
Datum/Zeit: | 30.12.2012 11:49:59 |
Hinweis: Dieser Quelltext ist Bestandteil des Projekts FB und installation deren Abhängigkeiten Automatisieren{Ubuntu/Debian}, zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.
set -e
chmod 777 -R ./
case "$1" in
"-i" | "-u")
;;
*)
echo "usage:"
echo "./FreeBASIC-0.24.0-linux.sh -i [prefix] install FB into prefix directory"
echo "./FreeBASIC-0.24.0-linux.sh -u [prefix] uninstall FB from prefix directory"
echo "(default prefix: /usr/local)"
exit 1
;;
esac
if [ -n "$2" ]; then
prefix="$2"
else
prefix=/usr/local
fi
if [ ! -d "$prefix" ]; then
echo "$prefix is not a valid directory"
exit 1
fi
if [ ! -w "$prefix" ]; then
echo "You need root priviledges to access $prefix"
exit 1
fi
case "$1" in
"-i")
mkdir -p -m 0755 "$prefix/bin"
install bin/fbc "$prefix/bin"
mkdir -p -m 0755 "$prefix/include/freebasic"
cp -r include/freebasic/* "$prefix/include/freebasic"
mkdir -p -m 0755 "$prefix/lib/freebasic"
cp -r lib/freebasic/* "$prefix/lib/freebasic"
mkdir -p -m 0755 "$prefix/man/man1"
gzip -c doc/fbc.1 > "$prefix/man/man1/fbc.1.gz"
echo "FreeBASIC compiler successfully installed in $prefix"
;;
"-u")
rm -f "$prefix/bin/fbc"
rm -rf "$prefix/include/freebasic"
rm -rf "$prefix/lib/freebasic"
rm -f "$prefix/man/man1/fbc.1.gz"
echo "FreeBASIC compiler successfully uninstalled from $prefix"
;;
esac
sudo aptitude install gcc g++ libncurses5-dev libxrender-dev libxrandr-dev libxpm-dev libffi-dev libncurses5-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev libffi-dev