-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall.sh
executable file
·60 lines (54 loc) · 1.22 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
#!/bin/bash
# Installation script for Unix.
PREFIX=/usr/local
BINDIR="$PREFIX/bin"
LIBDIR="$PREFIX/lib"
INCLUDEDIR="$PREFIX/include/libgrf"
PKGDATADIR="$PREFIX/share/grftool"
if test "$1" = "--help"; then
echo "GRF Tool Unix installation script."
echo
echo "To install GRF Tool:"
echo " ./install.sh"
echo
echo "To uninstall GRF Tool:"
echo " ./install.sh --uninstall"
exit
fi
uninstall=0
if test "$1" = "--uninstall"; then
uninstall=1
fi
function inst()
{
local base=`basename "$1"`
if test $uninstall = 1; then
echo "Deleting $2/$base"
rm -f "$2/$base"
else
echo "Installing $1 -> $2/$base"
mkdir -p "$2"
install "$1" "$2"
fi
}
set -e
if test "$uninstall" = 0; then
echo scons -Q
scons -Q
fi
inst gtk/grftool-gtk "$BINDIR"
inst gtk/grftool.glade "$PKGDATADIR"
inst tools/grftool "$BINDIR"
inst tools/spritetool "$BINDIR"
inst tools/gxtool "$BINDIR"
inst tools/libgrf-1.2.pc "$LIBDIR/pkgconfig"
inst lib/static/libstatic-grf.a "$LIBDIR"
inst lib/grf.h "$INCLUDEDIR"
inst lib/grfcrypt.h "$INCLUDEDIR"
inst lib/grfsupport.h "$INCLUDEDIR"
inst lib/grftypes.h "$INCLUDEDIR"
inst lib/rgz.h "$INCLUDEDIR"
inst lib/sprite.h "$INCLUDEDIR"
if test $uninstall = 1; then
rmdir "$INCLUDEDIR" "$LIBDIR/pkgconfig" 2> /dev/null
fi