tons of updates, should have checked in sooner
[buildscripts] / emacs
diff --git a/emacs b/emacs
index d6fd0c0b7c65ee2e2411f8718d626c5419a9007b..b9cc53b60824c2d67a1d73ee91a71690c173bdf4 100755 (executable)
--- a/emacs
+++ b/emacs
@@ -22,10 +22,12 @@ update=false
 bootstrap=false
 recompile=false
 show_pkgs=false
+dryrun=false
 
 while [[ $1 == -* ]]; do
   case $1 in
     -b) bootstrap=true; recompile=true ;;
+    -n) dryrun=true ;;
     -r) recompile=true ;;
     --no-r) recompile=false ;;
     -u) update=true ;;
@@ -58,7 +60,8 @@ for x in {35..25} ""; do
   fi
 done
 
-pkgs=(gawk attr autoconf-archive git install-info)
+# ccache is a missing build dep for mu
+pkgs=(gawk attr autoconf-archive git install-info ccache)
 ##### warning, apt-rdepends seems to look at the newest version of the package,
 ##### not the one that build-dep would install.
 if $show_pkgs; then
@@ -89,8 +92,11 @@ last_build=$dir/iank-emacs-build
 
 # e/e because autofs failing to mount will make it so
 # you cant ls whatever directory it is in, so we
-# need an extra directory
-dirs=($dir $dir-nox/.iank/e/e)
+# need an extra directory. i dunno why this was like this instead of just $dir-nox.
+#dirs=($dir $dir-nox/.iank/e/e)
+
+dirs=($dir $dir-nox)
+
 
 if [[ -e $dir ]]; then
   m cd $dir
@@ -108,6 +114,11 @@ else
   bootstrap=true
 fi
 
+if $dryrun; then
+  echo recompile=$recompile bootstrap=$bootstrap update=$update
+  exit 0
+fi
+
 if $bootstrap; then
   m rsync --delete -ra /a/opt/emacs/ $dir
   recompile=true
@@ -120,7 +131,7 @@ case $(distro-name) in
     ;;&
   debian|ubuntu|trisquel)
     # todo: unknown for other distros, this will fail
-    logq p -y build-dep maildir-utils/$(debian-codename)
+    logq p -y build-dep maildir-utils
     # oddly, on ubuntu 14.04 this installs postfix, but I dun care
     # ubuntu 14.04 gave this error message
     # Unable to satisfy the build-depends: Build-Depends: libpng-dev
@@ -138,17 +149,22 @@ if $recompile; then
   nox=false
   for d in ${dirs[@]}; do
     if $nox; then
-      # todo: this doesnt account for
-      m mkdir -p ${d%/*}
+      # Commented stuff in this block had something to do with ssh / autofs, im not really using nox right now,
+      # so unless I figure out why it was this way, ignore this.
+      # m mkdir -p ${d%/*}
       m rsync --delete -ra $dir/ $d
-      mp=$HOME/.iank/e/e
-      if mountpoint $mp &>/dev/null; then
-        m sudo umount $mp
-      fi
-      m mkdir -p $mp
-      m sudo mount -o bind $d $mp
-      m sudo chown $USER:$USER $mp
-      m cd $mp
+      #
+      # mp=$HOME/.iank/e/e
+      # if mountpoint $mp &>/dev/null; then
+      #   m sudo umount $mp
+      # fi
+      # m mkdir -p $mp
+      # m sudo mount -o bind $d $mp
+      # m sudo chown $USER:$USER $mp
+      # m cd $mp
+
+      #  instead of $mp above
+      m cd $d
     else
       m cd $d
     fi