X-Git-Url: https://iankelling.org/git/?p=buildscripts;a=blobdiff_plain;f=emacs;fp=emacs;h=5300c3cbf32c1e0bc143a43685c68f3777585577;hp=488da0cc27e75d1adb23c002c32415c809d06c26;hb=c5a1a48eda1f536677d345e39188311a2ad7d359;hpb=2f919040c2b04aa585017a7dfb531e660d8f9e6e 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