e93d63ebc21b663f24c4b730194f5929908b8690
[distro-setup] / filesystem / usr / local / bin / myupgrade-iank
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 source /usr/local/lib/err
8 pre="${0##*/}:"
9 m() { printf "$pre %s\n" "$*"; "$@"; }
10 e() { printf "$pre %s\n" "$*"; }
11 err() { echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: $pre: $*" >&2; }
12
13 if [[ $EUID == 0 ]]; then
14 err "run as nonroot"
15 exit 1
16 fi
17
18 hn=$(hostname -f)
19
20 /a/bin/buildscripts/rust
21
22 has_x=false
23 for pkg in xorg wayland; do
24 if dpkg -s -- $pkg |& grep -Fx "Status: install ok installed" &> /dev/null; then
25 has_x=true
26 break
27 fi
28 done
29
30 if $has_x; then
31 /a/bin/buildscripts/tor-browser
32 /a/bin/buildscripts/misc
33 fi
34
35
36
37 # source /a/bin/distro-setup/path-add-function
38 # export GOPATH=$HOME/go
39 # path-add $GOPATH/bin
40 # path-add /usr/local/go/bin
41 # l /a/bin/buildscripts/go
42 # l go get -u mvdan.cc/fdroidcl