consistent license, various updates
[buildscripts] / misc
1 #!/bin/bash
2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4
5 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
6
7 shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
8 set -eE -o pipefail
9 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
10 # alternatively, using https://iankelling.org/git/?p=errhandle;a=tree
11 # source /path/errhandle/err
12 # on my machine
13 source /a/bin/errhandle/err
14
15 # fuck pip. i hate it.
16 # pip install --user -U pip
17 # Traceback (most recent call last):
18 # File "/usr/local/bin/pip", line 10, in <module>
19 # sys.exit(main())
20 # TypeError: 'module' object is not callable
21 # if type -t pip &>/dev/null; then
22 # pip install --user -U pip
23 # else
24 # x=$(mktemp)
25 # wget -O$x https://bootstrap.pypa.io/get-pip.py
26 # python3 $x --user
27 # fi
28
29 # https://github.com/jlebon/textern
30 cd /a/opt/textern
31 git pull
32 make native-install USER=1