Commit a979b4bd9ced3058c1add1818513541e6955cc66
Detect script location
Charles Lehner committed on 6/14/2015, 3:58:11 AMParent: 3077b00cc9073a00c865eee83fdc91b2f77acacb
Files changed
feed.sh | changed |
feed.sh | |||
---|---|---|---|
@@ -1,8 +1,10 @@ | |||
1 | 1 … | #!/bin/sh | |
2 | 2 … | ||
3 | 3 … | test -z "$SITE_URL" && echo 'Define the SITE_URL env variable' >&2 && exit 1 | |
4 | 4 … | ||
5 … | +dir=$(dirname $([ -L $0 ] && readlink -f $0 || echo $0)) | ||
6 … | + | ||
5 | 7 … | hash uuidgen >&2 || uuidgen() { | |
6 | 8 … | cat /proc/sys/kernel/random/uuid 2>&- ||\ # Linux | |
7 | 9 … | cat /compat/linux/proc/sys/kernel/random/uuid 2>&- ||\ # FreeBSD | |
8 | 10 … | python -c 'import uuid; print uuid.uuid1()' | |
@@ -36,9 +38,9 @@ | |||
36 | 38 … | content $content_delim | |
37 | 39 … | commit %H | |
38 | 40 … | ||
39 | 41 … | %B | |
40 | -stat $content_delim" $@ | awk -f xml.awk -v site="$SITE_URL" | ||
42 … | +stat $content_delim" $@ | awk -f "$dir/xml.awk" -v site="$SITE_URL" | ||
41 | 43 … | ||
42 | 44 … | cat <<EOF | |
43 | 45 … | </feed> | |
44 | 46 … |
Built with git-ssb-web