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 $*