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
# 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
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
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
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