Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
5c3903ac4ba72ff9594a33c969e6fcb6b84cc8c1
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 518e4897c90d · Diff against parent 1
- Parent 2: eb5c48ee1cff · Showing diff
bugabingas dorkfiles
5c3903ac4ba72ff9594a33c969e6fcb6b84cc8c1
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+61 / −1 text lines
+1 / −0 text lines
new file mode 100644+59 / −0 text lines
# Check system statusexport def main [] { check-deps let git_status_notes = [ '-C' $env.NOTES status ] let git_status_dotfiles = [ '-C' $env.DOTFILES status ] # print git $git_status_notes run-external git ...$git_status_notes # print git $git_status_dotfiles run-external git ...$git_status_dotfiles macchina}# Synchronize by uploadingexport def up [] { check-deps let git_commit_notes = [ '-C' $env.NOTES commit '--all' ] let git_push_notes = [ '-C' $env.NOTES push ] let git_commit_dotfiles = [ '-C' $env.DOTFILES commit '--all' ] let git_push_dotfiles = [ '-C' $env.DOTFILES push ] # print git ...$git_commit_notes run-external git ...$git_commit_notes # print git $git_push_notes run-external git ...$git_push_notes # print git $git_commit_dotfiles run-external git ...$git_commit_dotfiles # print git $git_push_dotfiles run-external git ...$git_push_dotfiles}# Synchronise by downloadingexport def down [] { check-deps let git_pull_notes = [ '-C' $env.NOTES pull '-ff' ] let git_pull_dotfiles = [ '-C' $env.DOTFILES pull '-ff' ] # print git $git_pull_notes run-external git ...$git_pull_notes # print git $git_pull_dotfiles run-external git ...$git_pull_dotfiles # print topgrade run-external topgrade}def all-exist [] { all { which $in | is-not-empty } }def check-deps [] { let deps = [ git topgrade macchina ] if not ($deps | all-exist) { error make { msg: $"Install all of ($deps)" } }}+1 / −1 text lines