-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.sh
executable file
·37 lines (31 loc) · 937 Bytes
/
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
#!/bin/bash
REPODIR="$(dirname "$0")"
case $1 in
build)
# We might have a more sophisticated build process in the future...
mkdir -p dist
cat html/main.html > dist/album.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
bash "$0" installtodir "$idir"
done
;;
itd|installtodir)
idir="$(realpath "$2")"
echo "[INFO] Installing 'album.html' to '$idir'."
cat $REPODIR/dist/album.html > $idir/album.html
cd $idir && find | cut -c3- | sort > .find.txt
;;
easy_install)
./make.sh build
./make.sh install
;;
esac