this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move around some brewfiles and update pre-commit

+91 -28
+9 -1
.config/brew/Brewfile
··· 15 15 # ============================================================================== 16 16 17 17 # It would be nicer to use __dir__ here, but seems that this file is sometimes 18 - # `evalged which leaves __dir__ as an empty string. So we just hardcode the path. 18 + # `eval`ed which leaves __dir__ as an empty string. So we just hardcode the path. 19 19 Dir.glob(File.join(Dir.home, ".config", "brew", "*.Brewfile")) do |brewfile| 20 20 STDERR.puts "Loading #{brewfile}..." 21 21 instance_eval File.read(brewfile) ··· 74 74 brew "colima" 75 75 # Git extension for versioning large files 76 76 brew "git-lfs" 77 + # Pack, ship and run any application as a lightweight container 78 + brew "docker" 79 + # Platform keystore credential helper for Docker 80 + brew "docker-credential-helper" 81 + # Framework for managing multi-language pre-commit hooks 82 + brew "pre-commit" 83 + # Search tool like grep and The Silver Searcher 84 + brew "ripgrep"
-22
.config/yadm/alt/.config/brew/10-class.Brewfile##class.personal
··· 1 - # Install in home dir instead of /Applications 2 - cask_args appdir: "~/Applications" 3 - 4 1 # Fast static site generator in a single binary with everything built-in 5 2 brew "zola" 6 3 # Rust toolchain installer 7 4 brew "rustup-init" 8 - 9 - # 3D creation suite 10 - cask "blender" 11 - # Nintendo 3DS emulator 12 - cask "citra" 13 - # Voice and text chat software 14 - cask "discord" 15 - # VPN client for secure internet access and private browsing 16 - cask "nordvpn" 17 - # Instant messaging application focusing on security 18 - cask "signal" 19 - # Video game digital distribution service 20 - cask "steam" 21 - # Main codebase 22 - cask "texworks" 23 - # Add indentation to LaTeX files 24 - brew "latexindent" 25 - # Compact TeX distribution as alternative to the full TeX Live / MacTeX 26 - cask "basictex"
.config/yadm/alt/.config/brew/10-class.Brewfile##class.work .config/yadm/alt/.config/brew/casks/10-class.Brewfile##class.work
+22
.config/yadm/alt/.config/brew/20-os.Brewfile##os.Darwin
··· 5 5 tap "d12frosted/emacs-plus" 6 6 7 7 # ============================================================================== 8 + # Device-specific brewfiles 9 + # ============================================================================== 10 + 11 + # It would be nicer to use __dir__ here, but seems that this file is sometimes 12 + # `eval`ed which leaves __dir__ as an empty string. So we just hardcode the path. 13 + Dir.glob(File.join(Dir.home, ".config", "brew", "casks", "*.Brewfile")) do |brewfile| 14 + STDERR.puts "Loading #{brewfile}..." 15 + instance_eval File.read(brewfile) 16 + end 17 + 18 + # ============================================================================== 8 19 # Formulae 9 20 # ============================================================================== 10 21 ··· 63 74 cask "visual-studio-code" 64 75 # Multimedia player 65 76 cask "vlc" 77 + # Utility to create and modify archives 78 + cask "betterzip" 79 + tap "homebrew/cask-fonts" 80 + # QuickLook generator for Markdown files 81 + cask "qlmarkdown" 82 + # Thumbnails, static previews, cover art and metadata for video files 83 + cask "qlvideo" 84 + # Quicklook extension for source files 85 + cask "syntax-highlight" 86 + # Video communication and virtual meeting platform 87 + cask "zoom"
+21
.config/yadm/alt/.config/brew/casks/10-class.Brewfile##class.personal
··· 1 + # Install in home dir instead of /Applications 2 + cask_args appdir: "~/Applications" 3 + 4 + # 3D creation suite 5 + cask "blender" 6 + # Nintendo 3DS emulator 7 + cask "citra" 8 + # Voice and text chat software 9 + cask "discord" 10 + # VPN client for secure internet access and private browsing 11 + cask "nordvpn" 12 + # Instant messaging application focusing on security 13 + cask "signal" 14 + # Video game digital distribution service 15 + cask "steam" 16 + # Main codebase 17 + cask "texworks" 18 + # Add indentation to LaTeX files 19 + brew "latexindent" 20 + # Compact TeX distribution as alternative to the full TeX Live / MacTeX 21 + cask "basictex"
+39 -5
.config/yadm/hooks/pre_commit
··· 2 2 3 3 set -o nounset 4 4 5 + tmpdir=$(mktemp -d) 6 + # trap 'rm -rf $tmpdir' EXIT 5 7 trap 'echo ; exit -2' INT 8 + echo "$tmpdir" 6 9 7 10 # Start from the base yadm directory 8 11 cd "$(dirname "${BASH_SOURCE[0]}")" || exit_with_error "Failed to find yadm directory!" ··· 42 45 fi 43 46 fi 44 47 45 - # TODO: maybe do a brew bundle dump and check against that somehow... particularly 46 - # for vscode extensions it would be nice to automatically update the list. 47 - if grep --quiet Brewfile <(echo "$CHANGED_FILES"); then 48 - echo "Checking that all packages in Brewfile are installed..." 48 + if grep --quiet Brewfile <(echo "$CHANGED_FILES") && command -v brew >/dev/null; then 49 49 # A little faster if we don't have to wait for auto-update 50 50 export HOMEBREW_NO_AUTO_UPDATE=1 51 - if ! brew bundle check --global --no-upgrade --verbose ; then 51 + set -o pipefail 52 + 53 + # TODO: maybe check this all the time instead of just when brewfile changes 54 + if command -v jq >/dev/null; then 55 + echo "Checking that all installed packages are in Brewfile..." 56 + if ! { 57 + brew bundle dump --quiet --file "$tmpdir/Brewfile" && 58 + brew bundle install --quiet --no-upgrade --file "$tmpdir/Brewfile" 59 + } >/dev/null; then 60 + warn "Failed to dump current brew packages" 61 + WARNINGS=$((WARNINGS + 1)) 62 + fi 63 + 64 + # TODO: only add `brew leaves` packages, not all lockfile packages 65 + 66 + jq '.entries | .brew | to_entries | .[].key' -r "$tmpdir/Brewfile.lock.json" | 67 + xargs brew add --global --formula 2>/dev/null 68 + WARNINGS=$((WARNINGS + $?)) 69 + jq '.entries | .cask | to_entries | .[].key' -r "$tmpdir/Brewfile.lock.json" | 70 + xargs brew add --cask --file ~/.config/brew/20-os.Brewfile 2>/dev/null 71 + WARNINGS=$((WARNINGS + $?)) 72 + 73 + # TODO: add warning if entries added, pre-commit would make this easier 74 + 75 + # TODO: vscode not supported yet 76 + # jq '.entries | .vscode | to_entries | .[].key' -r "$tmpdir/Brewfile.lock.json" | 77 + # xargs brew add --file ~/.config/brew/30-vscode.Brewfile 78 + fi 79 + 80 + echo "Checking that all packages in Brewfile are installed..." 81 + if ! brew bundle check --global --no-upgrade --verbose | grep -E 'needs|satisfied'; then 52 82 warn "Brewfile(s) is out of date or incorrect" 53 83 WARNINGS=$((WARNINGS + 1)) 54 84 fi 85 + 86 + set +o pipefail 55 87 fi 56 88 57 89 # Check for unstaged changes (typically new functions/completions or config files) ··· 83 115 fi 84 116 85 117 # TODO: convert other scripts to fish instead of bash (except bootstrap) 118 + # or actually, just user pre-commit instead of this mess. Maybe bootstrap could 119 + # also be converted to something less complicated