From: Ian Kelling Date: Tue, 10 Nov 2020 20:01:36 +0000 (-0500) Subject: emacs fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=c5a1a48eda1f536677d345e39188311a2ad7d359;p=buildscripts emacs fixes --- diff --git a/emacs b/emacs index 488da0c..5300c3c 100755 --- a/emacs +++ b/emacs @@ -42,9 +42,9 @@ export CFLAGS="-Og -g3" export DEBIAN_FRONTEND=noninteractive pupdate -for x in {35..24}; do +for x in {35..25} ""; do if apt-cache showsrc emacs$x 2>/dev/null |grep . &>/dev/null; then - echo $x + echo latest_emacs=$x latest_emacs=emacs$x break fi @@ -80,19 +80,25 @@ last_build=$dir/iank-emacs-build # need an extra directory dirs=($dir $dir-nox/.iank/e/e) -m cd $dir - -rev=$(cat $last_build 2>/dev/null) ||: -head=$(git rev-parse HEAD) - -if ! $recompile && [[ $rev == "$head" ]]; then - echo "already compiled, exiting" - exit 0 +if [[ -e $dir ]]; then + m cd $dir + rev=$(cat $last_build 2>/dev/null) ||: + head=$(git rev-parse HEAD) + if ! $recompile && ! $bootstrap && [[ $rev == "$head" ]]; then + echo "already compiled, exiting" + exit 0 + fi + if [[ $rev != "$head" ]]; then + bootstrap=true + fi +else + m cd /a/opt/emacs + head=$(git rev-parse HEAD) + bootstrap=true fi -if [[ ! -e $dir || $rev != "$head" ]]; then - m cp -ar /a/opt/emacs $dir - bootstrap=true +if $bootstrap; then + m rsync --delete -ra /a/opt/emacs/ $dir recompile=true fi @@ -125,10 +131,8 @@ fi nox=false for d in ${dirs[@]}; do - if [[ -d $d ]]; then - m cd $d - fi if $nox; then + # todo: this doesnt account for m mkdir -p ${d%/*} m rsync --delete -ra $dir/ $d mp=$HOME/.iank/e/e @@ -139,6 +143,8 @@ for d in ${dirs[@]}; do m sudo mount -o bind $d $mp m sudo chown $USER:$USER $mp m cd $mp + else + m cd $d fi if $recompile || [[ ! -e configure ]]; then # todo, consider when this should be uncommented @@ -185,11 +191,11 @@ for d in ${dirs[@]}; do logq sudo make install # make emacs always work for root sudo /a/exe/lnf /usr/local/bin/emacs /usr/bin - - echo $head >$last_build fi nox=true done +echo $head >$last_build + #git clone https://github.com/djcb/mu # note: master failed on t8, i moved back to the commit before a bug