-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh.example
48 lines (35 loc) · 1.13 KB
/
install.sh.example
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
#!/bin/bash
# install.sh.example v2.16
# This is an example installation script! For most systems it should work,
# but this script is specifically for installing Moped into an Arch Linux
# system with makepkg. That is, you need to make a PKGBUILD file for this.
if [ $# -ne 1 ]; then
echo "Usage: $0 <INSTALLATION PREFIX>"
exit 1
fi
# the package directory prefix, for example: /tmp/moped/
PREFIX="$1"
STARTDIR=$PWD
BINDIR="$PREFIX/usr/bin"
DATADIR="$PREFIX/usr/lib/moped"
DOCDIR="$PREFIX/usr/share/doc/moped"
MANDIR="$PREFIX/usr/share/man"
echo -n "Installing Moped with prefix $PREFIX... "
cd $STARTDIR/src
install -d $DATADIR
install -m644 *.py $DATADIR/
install -m755 moped.py $DATADIR/
cd $STARTDIR
install -d $DOCDIR
install -m644 BUGS CHANGES README $DOCDIR/
cd $STARTDIR/doc
install -d $DOCDIR/examples
install -m644 examples/* $DOCDIR/examples/
install -d $PREFIX/usr/share/man/man1
install -m644 man/moped.1 $MANDIR/man1/
# Install a symlink to the normal binary directory, so that moped
# is also in the system path and can be excuted with `moped`.
#install -d $BINDIR
#ln -s $DATADIR/moped.py $BINDIR/moped
echo "done."
exit 0