From 9a2c4328d53b1de899b7257a3c88c931354c3e47 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Mon, 18 Nov 2019 10:13:03 -0500 Subject: [PATCH] More scripts --- bin/clean | 9 +++++++++ bin/sync | 9 +++++++++ bin/update | 2 -- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 bin/clean create mode 100755 bin/sync diff --git a/bin/clean b/bin/clean new file mode 100755 index 0000000..0a0b251 --- /dev/null +++ b/bin/clean @@ -0,0 +1,9 @@ +#!/bin/sh + +if command -v brew &> /dev/null; then + brew cleanup +fi + +if command -v nix &> /dev/null; then + nix-collect-garbage -d +fi diff --git a/bin/sync b/bin/sync new file mode 100755 index 0000000..9a1a336 --- /dev/null +++ b/bin/sync @@ -0,0 +1,9 @@ +#!/bin/sh + +if command -v offlineimap &> /dev/null; then + offlineimap +fi + +if command -v vdirsyncer &> /dev/null; then + vdirsyncer sync +fi diff --git a/bin/update b/bin/update index fa6808a..590b81e 100755 --- a/bin/update +++ b/bin/update @@ -1,6 +1,5 @@ #!/bin/sh -# if type "$brew" > /dev/null; then if command -v brew &> /dev/null; then brew update brew upgrade @@ -8,7 +7,6 @@ if command -v brew &> /dev/null; then fi if command -v nix &> /dev/null; then -# if type "$nix" > /dev/null; then nix-channel --update nix-env -u home-manager switch