From 04770be267d79757426ace930b563e94210a35dc Mon Sep 17 00:00:00 2001 From: Manuel Amago Date: Wed, 10 Aug 2016 17:32:47 +0100 Subject: Add install script Creates home directory dot file symlinks to the repository files. --- dot-emacs | 5 +++++ dot-profile | 9 --------- install.sh | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100755 install.sh diff --git a/dot-emacs b/dot-emacs index b4837d6..0291c63 100644 --- a/dot-emacs +++ b/dot-emacs @@ -23,6 +23,11 @@ (define-key key-translation-map (kbd "£") "#") ; hash (define-key key-translation-map (kbd "H-3") (kbd "£")) ; pound +;; Disable C-z - background process +;; Unbind Pesky Sleep Button +(global-unset-key [(control z)]) +(global-unset-key [(control x)(control z)]) + ;; IDO for auto-completion (ido-mode 1) (setq ido-enable-flex-matching t) diff --git a/dot-profile b/dot-profile index d6d3e87..08e60cd 100644 --- a/dot-profile +++ b/dot-profile @@ -24,12 +24,3 @@ alias egrep='egrep --color=auto' alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' - -## -# Your previous /Users/mamago/.profile file was backed up as /Users/mamago/.profile.macports-saved_2014-11-02_at_10:11:49 -## - -# MacPorts Installer addition on 2014-11-02_at_10:11:49: adding an appropriate PATH variable for use with MacPorts. -export PATH="/opt/local/bin:/opt/local/sbin:$PATH" -# Finished adapting your PATH environment variable for use with MacPorts. - diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7d1d2fe --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Adapted from https://github.com/torvald/dotfiles + +# Create symlinks for all dotfiles +# Use -f to overwrite existing dotfiles + +DOTFILES=$(ls -1 -d $PWD/dot-*) + +LN_OPTS="-s" +if [[ "$1" == "-f" ]]; then + LN_OPTS="$LN_OPTS -f" +fi + +for DOTFILE in $DOTFILES; do + BASENAME=$(basename $DOTFILE) + TARGET="$HOME/${BASENAME/dot-/.}" + echo ln $LN_OPTS $DOTFILE $TARGET + ln $LN_OPTS $DOTFILE $TARGET +done + +exit $? -- cgit v1.2.1