Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

91 linhas
1.8 KiB

  1. home ?= $(HOME)
  2. dotfiles_dir ?= $(home)/10sr_dotfiles
  3. dotfiles_url_base=https://raw.githubusercontent.com/10sr/dotfiles/master/
  4. localdir = $(home)/.local
  5. vardir = $(home)/.var
  6. bindir = $(localdir)/bin
  7. current = $(shell date)
  8. ostype = $(shell uname)
  9. shrc_loadables = sh bash zsh
  10. shrc_common_tpl =
  11. emacs ?= emacs
  12. tests = test_el test_shrc
  13. test: $(tests)
  14. setups = setup_darwin setup_directories setup_emacs
  15. setup: $(setups)
  16. setup_darwins = setup_darwin_defaults setup_darwin_daemon
  17. setup_darwin: $(setup_darwins)
  18. setup_directories = $(localdir) $(vardir) $(bindir)
  19. setup_directory = $(setup_directories)
  20. .PHONY: all default test $(tests) setup $(setups) $(setup_darwins) emacs
  21. all: default
  22. # setups
  23. # ======
  24. # create directories
  25. # ------------------
  26. $(localdir) $(vardir) $(bindir):
  27. mkdir -vp $@
  28. # darwin
  29. # ------
  30. setup_darwin_defaults:
  31. # http://appdrill.net/60641/mac-boot-mute.html
  32. #sudo nvram SystemAudioVolume=%80
  33. # add quit entry in menu
  34. defaults write com.apple.finder QuitMenuItem -bool YES
  35. # show full path on titlebar
  36. defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
  37. # do not show desktop icons
  38. defaults write com.apple.finder CreateDesktop -boolean false
  39. killall Finder
  40. # disable dashboard
  41. #defaults write com.apple.dashboard mcx-disabled -bool YES
  42. setup_darwin_daemon:
  43. test "`launchctl getenv LC_ALL`" = C || sudo launchctl setenv LC_ALL C
  44. if ! (launchctl list | grep com.apple.locate) >/dev/null ;\
  45. then \
  46. sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist ;\
  47. fi
  48. # emacs setup
  49. # -----------
  50. setup_emacs: emacs.el
  51. $(emacs) -q --debug-init --batch --load $< -f my-auto-install-package
  52. # test
  53. # ====
  54. test_shrc: shrc
  55. sh -exc 'for sh in $(shrc_loadables); do $$sh -n $<; done'
  56. test_el: emacs.el
  57. $(emacs) -q --debug-init --batch --eval "(setq debug-on-error t)" \
  58. --load $< --kill