[Emacs] Update variable name in hook util
This commit is contained in:
		@@ -1,15 +1,15 @@
 | 
				
			|||||||
# -*- mode: sh -*-
 | 
					# -*- mode: sh -*-
 | 
				
			||||||
EMACS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
 | 
					EMACS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
 | 
				
			||||||
TOP_LEVEL="$(git rev-parse --show-toplevel)"
 | 
					TOP_LEVEL="$(git rev-parse --show-toplevel)"
 | 
				
			||||||
README="$EMACS_DIR/README.org"
 | 
					TARGET="$EMACS_DIR/README.org"
 | 
				
			||||||
REPOSITORY_NAME="$(realpath --relative-to="$TOP_LEVEL" "$README")"
 | 
					REPOSITORY_NAME="$(realpath --relative-to="$TOP_LEVEL" "$TARGET")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
readme_was_updated() {
 | 
					readme_was_updated() {
 | 
				
			||||||
	git diff HEAD HEAD~1 --name-only | grep --quiet "$REPOSITORY_NAME"
 | 
						git diff HEAD HEAD~1 --name-only | grep --quiet "$REPOSITORY_NAME"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
update_index () {
 | 
					update_index () {
 | 
				
			||||||
	emacsclient -e "(with-current-buffer (find-file-noselect \"$README\")
 | 
						emacsclient -e "(with-current-buffer (find-file-noselect \"$TARGET\")
 | 
				
			||||||
			   		    (org-html-export-to-html))"
 | 
								   		    (org-html-export-to-html))"
 | 
				
			||||||
	cp -f "$EMACS_DIR/README.html" "$TOP_LEVEL/index.html"
 | 
						cp -f "$EMACS_DIR/README.html" "$TOP_LEVEL/index.html"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user