on cfa67d5 help sign in
astrolabe/install.sh
39 lines 926 B history raw
1#!/bin/bash
2#
3# Taken from: https://github.com/timlucmiptev/btc-agents/blob/master/install.sh
4# by ~timluc-miptev
5#
6usage() { printf "Usage: $0 [-w] URBIT_PIER_DIRECTORY \n(-w: flag to watch and live copy code)\n" 1>&2; exit 1; }
8if [ $# -eq 0 ]; then
9 usage
10 exit 2
11fi
12PIER=$1
13EXCLUDE_FILE=ignore_files.txt
15while getopts "w" opt; do
16 case ${opt} in
17 w) WATCH_MODE="true"
18 PIER=$2
19 ;;
20 *) usage
21 ;;
22 esac
23done
25if [ -z "$WATCH_MODE" ]; then
26 echo "Installed %astrolabe"
27 # rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./desk/* $PIER/
28 rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./desk/* $PIER/
30else
31 echo "Watching for changes to copy to ${PIER}..."
32 while [ 0 ]
33 do
34 sleep 0.8
35 # rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./desk/* $PIER/
36 rsync -r --copy-links --exclude-from=$EXCLUDE_FILE ./desk/* $PIER/
38 done
39fi