From 2a58bef2c7c7761b39ae68d0f5c71abfc295e868 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 13 Jan 2015 15:14:53 +0900 Subject: [PATCH 1/3] Add Makefile that has test target --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..92ad6f7 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +emacs ?= emacs + +shrc_loadables = sh bash zsh + +.PHONY: all default test emacs + +all: default + +emacs: emacs.el + $(emacs) -q --debug-init --batch --load $< -f my-auto-install-package + + +test: test_el test_shrc + +test_shrc: shrc + sh -exc 'for sh in $(shrc_loadables); do $$sh -n $<; done' + +test_el: emacs.el + $(emacs) -q --debug-init --batch --eval "(setq debug-on-error t)" \ + --load $< --kill From c227c27b2cc48ac71cc2002aa200cee0e0a57af7 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 13 Jan 2015 15:17:06 +0900 Subject: [PATCH 2/3] Change travis.ci to use make test for test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e1858c..407707c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: shell before_install: - sudo apt-get install zsh -script: ./test/run.sh +script: make test notifications: email: 8slashes+travis-ci@gmail.com From 38cb4b5f65c3162814b00bc888a4120cf53d0fc4 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 13 Jan 2015 16:56:29 +0900 Subject: [PATCH 3/3] Update makefile --- Makefile | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 92ad6f7..49d3dd7 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,86 @@ -emacs ?= emacs +home ?= $(HOME) + +dotfiles_dir ?= $(home)/10sr_dotfiles +dotfiles_url_base=https://raw.githubusercontent.com/10sr/dotfiles/master/ + +localdir = $(home)/.local +vardir = $(home)/.var +bindir = $(localdir)/bin + +current = $(shell date) +ostype = $(shell uname) shrc_loadables = sh bash zsh +shrc_common_tpl = + +emacs ?= emacs + +tests = test_el test_shrc +test: $(tests) -.PHONY: all default test emacs +setups = setup_darwin setup_directories setup_emacs +setup: $(setups) + +setup_darwins = setup_darwin_defaults setup_darwin_daemon +setup_darwin: $(setup_darwins) + +setup_directories = $(localdir) $(vardir) $(bindir) +setup_directory = $(setup_directories) + +.PHONY: all default test $(tests) setup $(setups) $(setup_darwins) emacs all: default -emacs: emacs.el + + +# setups +# ====== + +# create directories +# ------------------ +$(localdir) $(vardir) $(bindir): + mkdir -vp $@ + + + + +# darwin +# ------ + +setup_darwin_defaults: +# http://appdrill.net/60641/mac-boot-mute.html +#sudo nvram SystemAudioVolume=%80 + +# add quit entry in menu + defaults write com.apple.finder QuitMenuItem -bool YES +# show full path on titlebar + defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES +# do not show desktop icons + defaults write com.apple.finder CreateDesktop -boolean false + + killall Finder + +# disable dashboard +#defaults write com.apple.dashboard mcx-disabled -bool YES + +setup_darwin_daemon: + test "`launchctl getenv LC_ALL`" = C || sudo launchctl setenv LC_ALL C + if ! (launchctl list | grep com.apple.locate) >/dev/null ;\ + then \ + sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist ;\ + fi + + + +# emacs setup +# ----------- + +setup_emacs: emacs.el $(emacs) -q --debug-init --batch --load $< -f my-auto-install-package -test: test_el test_shrc +# test +# ==== test_shrc: shrc sh -exc 'for sh in $(shrc_loadables); do $$sh -n $<; done'