-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinstall.sh
executable file
·39 lines (34 loc) · 951 Bytes
/
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
#!/bin/bash
#
# Taken from: https://github.com/timlucmiptev/btc-agents/blob/master/install.sh
# by ~timluc-miptev
#
usage() { printf "Usage: $0 [-w] URBIT_PIER_DIRECTORY \n(-w: flag to watch and live copy code)\n" 1>&2; exit 1; }
if [ $# -eq 0 ]; then
usage
exit 2
fi
PIER=$1
EXCLUDE_FILE=ignore_files.txt
while getopts "w" opt; do
case ${opt} in
w) WATCH_MODE="true"
PIER=$2
;;
*) usage
;;
esac
done
if [ -z "$WATCH_MODE" ]; then
echo "Installed %canvas"
# rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./canvas-desk/* $PIER/
rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./canvas-desk/* $PIER/
else
echo "Watching for changes to copy to ${PIER}..."
while [ 0 ]
do
sleep 0.8
# rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./canvas-desk/* $PIER/
rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./canvas-desk/* $PIER/
done
fi