docs/sysupdate.example (841 bytes)
1 #!/bin/sh -e 2 # Update everything: system packages, Nix, then each source repo in the list below. 3 # Copy to a directory on PATH and edit the list and the commands for your system. 4 # system packages: replace with your distro's updater (kiss update, apt upgrade, ...) 5 kiss update 6 # Nix: rebuild the system profile with the compile script from nix-compile.example 7 su -c '/path/to/nix-compile.sh' 8 # format: "dir mode [build command]"; custom = merge upstream into a patched branch, shell on conflict 9 while read -r dir mode build <&3; do 10 cd "$dir" || continue 11 git pull --ff-only || true 12 [ "$mode" = custom ] && { git remote set-head origin -a >/dev/null && git merge origin/HEAD || ${SHELL:-sh}; } 13 [ -z "$build" ] || sh -c "$build" 14 done 3<<EOF 15 # $HOME/src/patched-project custom make && su -c 'make install' 16 # $HOME/src/plain-project pull 17 EOF