diff --git a/dotfiles/emacs.d/bin/git-hooks/post-commit b/dotfiles/emacs.d/bin/git-hooks/post-commit deleted file mode 100755 index 58b4293c..00000000 --- a/dotfiles/emacs.d/bin/git-hooks/post-commit +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -THIS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -source "$THIS_DIR/../util.sh" - -if readme_was_updated; then - update_index - commit_index_changes -fi diff --git a/dotfiles/emacs.d/bin/install_hooks.sh b/dotfiles/emacs.d/bin/install_hooks.sh deleted file mode 100755 index 838bec59..00000000 --- a/dotfiles/emacs.d/bin/install_hooks.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -TOP_LEVEL="$(git rev-parse --show-toplevel)" -HOOK_DIR="$TOP_LEVEL/.git/hooks" - -THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -SOURCE_DIR="$THIS_DIR/git-hooks" - -for hook in "$SOURCE_DIR"/*; do - filename=$(basename "$hook") - source="$SOURCE_DIR/$filename" - dest="$HOOK_DIR/$filename" - # If the hook already exists, is executable, and is not a symlink - if [ -e "$dest" ]; then - mv "$dest" "$dest.local" - fi - echo "linking $source to $dest" - ln -s "$source" "$dest" - chmod 755 "$dest" -done diff --git a/dotfiles/emacs.d/bin/update_github_page.sh b/dotfiles/emacs.d/bin/update_github_page.sh deleted file mode 100755 index 3a9904a0..00000000 --- a/dotfiles/emacs.d/bin/update_github_page.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source "$THIS_DIR/util.sh" - -update_index diff --git a/dotfiles/emacs.d/bin/util.sh b/dotfiles/emacs.d/bin/util.sh deleted file mode 100755 index 20b0d66b..00000000 --- a/dotfiles/emacs.d/bin/util.sh +++ /dev/null @@ -1,21 +0,0 @@ -# -*- mode: sh -*- -EMACS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" -TOP_LEVEL="$(git rev-parse --show-toplevel)" -TARGET="$EMACS_DIR/README.org" -REPOSITORY_NAME="$(realpath --relative-to="$TOP_LEVEL" "$TARGET")" - -readme_was_updated() { - git diff HEAD HEAD~1 --name-only | grep --quiet "$REPOSITORY_NAME" -} - -update_index () { - emacsclient -e "(with-current-buffer (find-file-noselect \"$TARGET\") - (let ((org-export-headline-levels 10)) - (org-html-export-to-html)))" - cp -f "$EMACS_DIR/README.html" "$TOP_LEVEL/index.html" -} - -commit_index_changes () { - git add "$TOP_LEVEL/index.html" - git commit -m "[Emacs] Update github pages index file" -}