Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Chrome ate my profile



Darren Cook writes:

 > Now, assuming I have got rid of most of the noise, what I really need is
 > a 30 minute cronjob to automate the git commits... 'cos I just looked
 > and my last commit was 6 weeks ago. :-)

I don't use this anymore, but for posterity's sake:

(defun autocommit-function ()
  "Add this to 'after-save-hook with #'add-hook."
  (when (= 0 (shell-command "git branch | grep auto-commits >/dev/null 2>&1"))
    (let ((current-branch
           (substring (shell-command-to-string "git branch | grep
           '^*'") 2)))
      (shell-command "git checkout auto-commits")
      (shell-command "git commit -a -m 'auto-commit'")
      (shell-command (format "git checkout %s" current-branch)))))

I do use this for updating my schedule page:

schedule.html: schedule.txt
	$(RST2HTML) $< > $@
	-git commit -m "Update schedule." schedule.txt

This turned out not to work as planned.  I started out by doing test
builds with M-! rst2html schedule.txt >schedule.html && open schedule.html,
and only doing make when I wanted to upload (make upload depends on
schedule.html), but it turns out to be easier to type "make upload"
and hit the refresh on the page from my webserver. ;-)

 > My git commit entry says:
 > 
 >     Removed opera, chromium, Slack, Code from the git
 >     repository (as they were putting cache data in here,
 >     not just config)
 > 
 > I should probably have persevered with a more fine-grained
 > .gitignore.

Yeah, I would agree with that, although it's strange that they do
that.  It's especially strange for Chromium since it *also has a
directory in ~/.cache*!

-- 
Associate Professor              Division of Policy and Planning Science
http://turnbull/sk.tsukuba.ac.jp/     Faculty of Systems and Information
Email: turnbull@example.com                   University of Tsukuba
Tel: 029-853-5175                 Tennodai 1-1-1, Tsukuba 305-8573 JAPAN


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links