adopt kitty
[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 # source /a/bin/distro-setup/path-add-function
37 # export GOPATH=$HOME/go
38 # path-add $GOPATH/bin
39 # path-add /usr/local/go/bin
40 # l /a/bin/buildscripts/go
41 # l go get -u mvdan.cc/fdroidcl