Bob Mottram 2 months ago
parent
commit
33694ae101
2 changed files with 70 additions and 70 deletions
  1. 68 68
      emacs-setup.sh
  2. 2 2
      emacs.d/init/init.org

+ 68 - 68
emacs-setup.sh

@@ -7,12 +7,12 @@ function install_el {
 
     if [ ${#name} -eq 0 ]; then
         echo "No name given"
-        exit 3583957953
+        exit 35
     fi
 
     if [ ${#repo} -eq 0 ]; then
         echo "Repo missing for $name"
-        exit 3578356835
+        exit 35
     fi
 
     if ! grep -Fxq "$name" "$INSTALL_FILE"; then
@@ -20,39 +20,39 @@ function install_el {
         mkdir "$HOME/elisp/$name"
         if ! git clone "$repo" "$HOME/elisp/$name"; then
             echo "Error cloning $name"
-            exit 48983
+            exit 48
         fi
         if [ ! -d "$HOME/elisp/$name" ]; then
-            exit 46834683465
+            exit 46
         fi
         if [ -f "$HOME/elisp/$name/Cask" ]; then
-            cd "$HOME/elisp/$name" || exit 3468365
+            cd "$HOME/elisp/$name" || exit 34
             if ! cask install; then
                 echo 'cask install failed'
                 #exit 6284625
             fi
         else
             if [ "$compile" ]; then
-                cd "$HOME/elisp/$name" || exit 3468365
+                cd "$HOME/elisp/$name" || exit 34
                 if [[ "$compile" == 'all' ]]; then
                     if ! make; then
                         echo "Failed to make $name"
-                        exit 35873568
+                        exit 35
                     fi
                 else
                     if ! make "$compile"; then
                         echo "Failed to make $name"
-                        exit 73568352
+                        exit 73
                     fi
                 fi
                 sudo make install
             else
                 if [ -f "$HOME/elisp/$name/Makefile" ]; then
                     echo "$name" >> ~/.emacs_missing_makes
-                    cd "$HOME/elisp/$name" || exit 72452544
+                    cd "$HOME/elisp/$name" || exit 72
                     if ! make; then
                         echo "Failed to make $name"
-                        exit 2467256835
+                        exit 24
                     fi
                 fi
             fi
@@ -110,24 +110,24 @@ if ! grep -Fxq "cask" "$INSTALL_FILE"; then
     mkdir ~/elisp/cask
     if ! git clone https://github.com/cask/cask ~/elisp/cask; then
         echo 'Error cloning cask'
-        exit 3478362
+        exit 34
     fi
     if [ ! -d ~/elisp/cask ]; then
-        exit 7823533
+        exit 78
     fi
     if [ -d ~/.cask ]; then
         rm -rf ~/.cask
     fi
-    cd "$HOME/elisp/cask" || exit 36856835
+    cd "$HOME/elisp/cask" || exit 36
     if ! python2 go; then
-        exit 759365356935
+        exit 75
     fi
     echo "cask" >> "$INSTALL_FILE"
 fi
 
 export PATH="$HOME/.cask/bin:$PATH"
 if ! grep -q ".cask/bin" ~/.bashrc; then
-    echo 'export PATH="$HOME/.cask/bin:$PATH"' >> ~/.bashrc
+    echo "export PATH=\"\$HOME/.cask/bin:\$PATH\"" >> ~/.bashrc
     . ~/.bashrc
 fi
 
@@ -148,30 +148,30 @@ if ! grep -Fxq "ssss" "$INSTALL_FILE"; then
 fi
 export PATH="$HOME/elisp/s:$PATH"
 
-if ! grep -Fxq "emacs-libgit2" "$INSTALL_FILE"; then
-    if [ -d ~/elisp/emacs-libgit2 ]; then
-        rm -rf ~/elisp/emacs-libgit2
-    fi
-    if ! git clone https://github.com/ksjogo/emacs-libgit2 ~/elisp/emacs-libgit2; then
-        echo 'Error cloning libgit2'
-        exit 56
-    fi
-    if [ ! -d ~/elisp/emacs-libgit2 ]; then
-        exit 75
-    fi
-    cd ~/elisp/emacs-libgit2 || exit 24
-    git submodule update --init --recursive
-    if ! cmake .; then
-        echo 'Unable to cmake libgit2'
-        exit 68
-    fi
-    if ! make; then
-        echo 'Unable to make libgit2'
-        exit 69
-    fi
-    cd ~/ || exit 34
-    echo "emacs-libgit2" >> "$INSTALL_FILE"
-fi
+#if ! grep -Fxq "emacs-libgit2" "$INSTALL_FILE"; then
+#    if [ -d ~/elisp/emacs-libgit2 ]; then
+#        rm -rf ~/elisp/emacs-libgit2
+#    fi
+#    if ! git clone https://github.com/ksjogo/emacs-libgit2 ~/elisp/emacs-libgit2; then
+#        echo 'Error cloning libgit2'
+#        exit 56
+#    fi
+#    if [ ! -d ~/elisp/emacs-libgit2 ]; then
+#        exit 75
+#    fi
+#    cd ~/elisp/emacs-libgit2 || exit 24
+#    git submodule update --init --recursive
+#    if ! cmake .; then
+#        echo 'Unable to cmake libgit2'
+#        exit 68
+#    fi
+#    if ! make; then
+#        echo 'Unable to make libgit2'
+#        exit 69
+#    fi
+#    cd ~/ || exit 34
+#    echo "emacs-libgit2" >> "$INSTALL_FILE"
+#fi
 
 install_el f_el https://github.com/rejeep/f.el
 cd ~/elisp/f_el || exit 34
@@ -191,35 +191,35 @@ if ! grep -Fxq "org-mode" "$INSTALL_FILE"; then
         # a fallback repo
         if ! git clone https://github.com/jwiegley/org-mode ~/elisp/org-mode/org; then
             echo 'Error cloning org'
-            exit 5678
+            exit 56
         fi
     fi
     if [ ! -d ~/elisp/org-mode/org ]; then
-        exit 74873565673
+        exit 74
     fi
-    cd ~/elisp/org-mode/org || exit 24682748
+    cd ~/elisp/org-mode/org || exit 24
     if ! make; then
         echo 'Unable to make org-mode'
-        exit 67295
+        exit 67
     fi
     sudo make install
-    cd ~/ || exit 34768353
+    cd ~/ || exit 34
     echo "org-mode" >> "$INSTALL_FILE"
 fi
 
 if ! grep -Fxq "diminish" "$INSTALL_FILE"; then
     rm -rf ~/elisp/diminish
     mkdir ~/elisp/diminish
-    cd ~/elisp/diminish || exit 242746284
+    cd ~/elisp/diminish || exit 24
     rm ~/elisp/diminish/*
     if ! wget http://www.eskimo.com/~seldon/diminish.el; then
         echo 'Error getting diminish'
-        exit 47688
+        exit 47
     fi
     if [ ! -f diminish.el ]; then
-        exit 78353
+        exit 78
     fi
-    cd ~/ || exit 2346827
+    cd ~/ || exit 23
     echo "diminish" >> "$INSTALL_FILE"
 fi
 
@@ -228,17 +228,17 @@ install_el miniedit https://github.com/emacsmirror/miniedit
 if ! grep -Fxq "color-theme" "$INSTALL_FILE"; then
     rm -rf ~/elisp/color-theme
     mkdir ~/elisp/color-theme
-    cd ~/elisp/color-theme || exit 7823524
+    cd ~/elisp/color-theme || exit 78
     rm ~/elisp/color-theme/*
     if ! wget http://download.savannah.gnu.org/releases/color-theme/color-theme.el.gz; then
         echo 'Error getting color-theme'
-        exit 3790
+        exit 37
     fi
     if [ ! -f color-theme.el.gz ]; then
-        exit 63562824
+        exit 63
     fi
     gunzip ./*.gz
-    cd ~/ || exit 24672868453
+    cd ~/ || exit 24
     echo "color-theme" >> "$INSTALL_FILE"
 fi
 
@@ -298,10 +298,10 @@ if ! grep -Fxq "golden-ratio" "$INSTALL_FILE"; then
     mkdir ~/elisp/golden-ratio
     if ! git clone https://github.com/roman/golden-ratio.el ~/elisp/golden-ratio; then
         echo 'Error cloning golden-ratio'
-        exit 4623959
+        exit 46
     fi
     if [ ! -d ~/elisp/golden-ratio ]; then
-        exit 57824957585
+        exit 57
     fi
     emacs -batch -l ~/elisp/golden-ratio/golden-ratio.el ~/.emacs.d
     echo "golden-ratio" >> "$INSTALL_FILE"
@@ -312,10 +312,10 @@ if ! grep -Fxq "rainbow-delimeters" "$INSTALL_FILE"; then
     mkdir ~/elisp/rainbow-delimiters
     if ! git clone https://github.com/Fanael/rainbow-delimiters ~/elisp/rainbow-delimiters; then
         echo 'Error cloning rainbow-delimeters'
-        exit 654389
+        exit 65
     fi
     if [ ! -d ~/elisp/rainbow-delimiters ]; then
-        exit 5789357395953
+        exit 57
     fi
     emacs -batch -l ~/elisp/rainbow-delimiters/rainbow-delimiters.el ~/.emacs.d
     echo "rainbow-delimeters" >> "$INSTALL_FILE"
@@ -326,12 +326,12 @@ if ! grep -Fxq "popup-el" "$INSTALL_FILE"; then
     mkdir ~/elisp/popup-el
     if ! git clone https://github.com/auto-complete/popup-el ~/elisp/popup-el; then
         echo 'Error cloning popup-el'
-        exit 54379
+        exit 54
     fi
     if [ ! -d ~/elisp/popup-el ]; then
-        exit 578957295792579
+        exit 57
     fi
-    cd ~/elisp/popup-el || exit 24284628
+    cd ~/elisp/popup-el || exit 24
     emacs -batch -l ~/elisp/popup-el/popup.el ~/.emacs.d
     echo "popup-el" >> "$INSTALL_FILE"
 fi
@@ -341,10 +341,10 @@ if ! grep -Fxq "auto-complete" "$INSTALL_FILE"; then
     mkdir ~/elisp/auto-complete
     if ! git clone https://github.com/auto-complete/auto-complete ~/elisp/auto-complete; then
         echo 'Error cloning auto-complete'
-        exit 584394
+        exit 58
     fi
     if [ ! -d ~/elisp/auto-complete ]; then
-        exit 3746737835630
+        exit 37
     fi
     emacs -batch -l ~/elisp/auto-complete/etc/install.el ~/.emacs.d
     echo "auto-complete" >> "$INSTALL_FILE"
@@ -355,13 +355,13 @@ install_el htmlize https://github.com/emacsmirror/htmlize
 if ! grep -Fxq "undo-tree" "$INSTALL_FILE"; then
     rm -rf ~/elisp/undo-tree
     mkdir ~/elisp/undo-tree
-    cd ~/elisp/undo-tree || exit 782456274574
+    cd ~/elisp/undo-tree || exit 78
     if ! wget http://www.dr-qubit.org/undo-tree/undo-tree.el; then
         echo 'Error getting undo-tree'
-        exit 6373
+        exit 63
     fi
     if [ ! -f undo-tree.el ]; then
-        exit 5745478385
+        exit 57
     fi
     echo "undo-tree" >> "$INSTALL_FILE"
 fi
@@ -380,15 +380,15 @@ install_el seq https://github.com/NicolasPetton/seq.el
 if ! grep -Fxq "let-alist" "$INSTALL_FILE"; then
     rm -rf ~/elisp/let-alist
     mkdir ~/elisp/let-alist
-    cd ~/elisp/let-alist || exit 264258452
+    cd ~/elisp/let-alist || exit 26
     if ! wget http://elpa.gnu.org/packages/let-alist-1.0.3.el; then
         echo 'Failed to wget http://elpa.gnu.org/packages/let-alist-1.0.3.el'
-        exit 36587365856
+        exit 36
     fi
     mv let-alist-1.0.3.el let-alist.el
     if [ ! -f ~/elisp/let-alist/let-alist.el ]; then
         echo 'Error getting let-alist'
-        exit 637283
+        exit 63
     fi
     echo "let-alist" >> "$INSTALL_FILE"
 fi
@@ -417,7 +417,7 @@ install_el outorg https://github.com/tj64/outorg
 install_el org-caldav https://github.com/dengste/org-caldav
 install_el smart-mode-line https://github.com/Malabarba/smart-mode-line
 install_el erefactor https://github.com/mhayashi1120/Emacs-erefactor
-cd ~/elisp/erefactor || exit 364846384
+cd ~/elisp/erefactor || exit 36
 sed -i 's|(preceding-sexp)|(elisp--preceding-sexp)|g' ~/elisp/erefactor/erefactor.el
 make
 install_el iedit https://github.com/eproxus/emacs-iedit

+ 2 - 2
emacs.d/init/init.org

@@ -164,8 +164,8 @@ much the only time I shut down is when I need to update the system.
 (auto-complete-mode t)
 #+end_src
 *** Font
-#+begin_src emacs-lisp :tangle no
-(set-default-font “Noto Sans Mono 24”)
+#+begin_src emacs-lisp
+;;(set-default-font “Noto Sans Mono 24”)
 #+end_src
 *** Backups