From f47b20f2e0d30cf9420e5159ed341092a13268e5 Mon Sep 17 00:00:00 2001 From: Jason Wall Date: Mon, 27 Dec 2021 18:27:42 -0700 Subject: [PATCH] add shimmer feature --- dotfiles/dotfiles-shimmer | 3 +++ sub/libexec/dotfiles-shimmer | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 dotfiles/dotfiles-shimmer create mode 100755 sub/libexec/dotfiles-shimmer diff --git a/dotfiles/dotfiles-shimmer b/dotfiles/dotfiles-shimmer new file mode 100644 index 0000000..91b7e67 --- /dev/null +++ b/dotfiles/dotfiles-shimmer @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +eval "$(~/.shimmer/bin/shimmer init -)" diff --git a/sub/libexec/dotfiles-shimmer b/sub/libexec/dotfiles-shimmer new file mode 100755 index 0000000..3fe72cb --- /dev/null +++ b/sub/libexec/dotfiles-shimmer @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Usage: dotfiles shimmer prep + +# Provide dotfiles completions +if [ "$1" = "--complete" ]; then + echo prep + exit +fi + +function shimmer-run() { + local command=$1 + case $command in + prep) + if [ -d "$HOME/.shimmer" ]; then + cd ~/.shimmer && git pull + else + git clone https://github.com/jasonewall/shimmer.git ~/.shimmer + fi + ;; + *) + exec dotfiles help shimmer + ;; + esac +} + +shimmer-run $*