-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.sh
executable file
·38 lines (33 loc) · 1.04 KB
/
make.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
#!/bin/bash
REPODIR="$PWD"
case $1 in
build)
# We might have a more sophisticated build process in the future...
mkdir -p dist
cat html/main.html > dist/player.html
;;
install)
touch install_dirs.txt
install_dirs="$(cat install_dirs.txt)"
if [[ -z "$install_dirs" ]]; then
echo "[ERROR] No installation destination found. Please specify at least one in 'install_dirs.txt'."
exit 0
fi
IFS=$'\n'
for idir in $install_dirs; do
echo "[INFO] Installing 'player.html' to '$idir'."
cat $REPODIR/dist/player.html > $idir/player.html
cd $idir
rm .find.txt 2>/dev/null
for format in flac ape m4a wav aiff aif mp3; do
find -name "*.$format" | cut -c3- | sort >> .find.txt
done
sort .find.txt > .find.txt.new
mv .find.txt.new .find.txt
done
;;
easy_install)
./make.sh build
./make.sh install
;;
esac