3 if [[ -s ~
/.bashrc
]];then . ~
/.bashrc
;fi
11 while [[ $1 == -* ]]; do
15 --no-r) recompile
=false
;;
17 *) echo "$0: error: bad arg: $1" >&2; exit 1 ;;
25 dir
=/a
/opt
/mu-$
(distro-name
)$
(distro-num
)
26 last_build
=$dir/iank-mu-build
28 if [[ -e $dir ]]; then
30 rev=$
(cat $last_build 2>/dev
/null
) ||
:
31 head=$
(git rev-parse HEAD
)
32 if ! $recompile && ! $bootstrap && [[ $rev == "$head" ]]; then
33 echo "already compiled, exiting"
36 echo rev=$rev head=$head
37 if [[ $rev != "$head" ]]; then
41 head=$
(git rev-parse HEAD
)
46 e recompile
=$recompile bootstrap
=$bootstrap
51 m rsync
--delete -ra /a
/opt
/mu
/ $dir
57 if [[ $
(debian-codename
) == flidas
]]; then
58 # use the flidas branch, stuck behind because
59 # needs newer crypt libraries that are too troublesome.
62 # libgmime-3.0-dev is a newer version than build-dep installs for buster
63 # note, currently, need newer meson than t10
64 m pi libgmime-3.0
-dev meson
68 m .
/autogen.sh
&& make -j`nproc`
69 # note uninstall is implemented
72 # Workaround for some indecipherable build error
73 # that only happens after syncing the mu dir and not building from
74 # scratch. It seems there is some state somewhere, like ~/.local
75 # that doesn't get copied. Found the workaround by reading the Makefile,
76 # then doing a more verbose build with:
77 # ninja -C $PWD/build -v -d explain
78 sudo
touch -d @$
(($
(stat
-c%Y build
/build.ninja
) - 100)) /usr
/local
/bin
/emacs
81 echo $head >$last_build