-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbru.sh
executable file
·23 lines (18 loc) · 894 Bytes
/
bru.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# This autoupdate here is kinda crappy: I want to automatically do a
# 'git pull' of the bru repo everytime bru is being run, mostly to get
# updates of the ./library directory, but I don't want to do a
# 'git pull' more often than once a day.
# This auto-update would become unnecessary if the ./library content
# was ever migrated to a separate server (corresponding to npmjs.org
# or pypi.python.org), which I don't plan to do anytime soon.
# http://unix.stackexchange.com/questions/17499/get-path-of-current-script-when-executed-through-a-symlink
# This is brittle & frowned upon, I might change this some time...
if [ "$(uname)" == "Darwin" ]; then
script_dir="$(dirname "$(readlink "$0")")"
else
script_dir="$(dirname "$(readlink -f "$0")")"
fi
$script_dir/autoupdate.py --hours 24
# after the autoupdate run bru.py, forwarding all cmd line params
$script_dir/bru.py $@