~q3cpma/mus

ref: e99afe099fd0b6cf6a4cce58902c9612ecd9fca9 mus/build.sh -rwxr-xr-x 1.0 KiB
e99afe09q3cpma Finish build.sh and README, move TODO to root 11 months ago
                                                                                
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
#!/bin/sh
set -eu
cd -P -- "$(dirname -- "$0")"
. ./build_util.sh

export PROJECT=mus

PREFIX=$(preadlinkf "${DESTDIR+${DESTDIR%/}}${PREFIX:-/usr/local}")

if [ $# -eq 1 ]
then
	case "$(tolower "$1")" in
		install)
			set_rpaths bin="$PREFIX"/bin share="$PREFIX"/share/"$PROJECT" cbin="$PREFIX"/bin
			pb_install -m 755 -r "$PREFIX"/bin/ mus_client mus_daemon
			pb_install -m 644 "$PREFIX"/share/"$PROJECT"/ mus_util.sh
			pb_install -m 644 "$PREFIX"/share/doc/"$PROJECT"/README_"$PROJECT" README
			;;
		uninstall)
			uninstall \
				"$PREFIX"/bin/mus_client \
				"$PREFIX"/bin/mus_daemon \
				"$PREFIX"/share/mus/mus_util.sh \
				"$PREFIX"/share/doc/mus/README_"$PROJECT"
			;;
		albumtools_install)
			pb_install -m 755 -r "$PREFIX"/bin/ mus_album_* fair_shuf
			exit
			;;
		albumtools_uninstall)
			uninstall "$PREFIX"/bin/mus_album_* "$PREFIX"/bin/fair_shuf
			exit
			;;
		clean) # Just pass it to mus_player
			;;
		*)
			die "$1: unknown action"
			;;
	esac
elif [ $# -gt 1 ]
then
	pb_usage 1
fi

mus_player/build.sh player "$@"
mus_player/build.sh udsend "$@"