diff --git a/bin/docker-clean-containers b/bin/docker-clean-containers new file mode 100755 index 0000000..bf7ec7d --- /dev/null +++ b/bin/docker-clean-containers @@ -0,0 +1,2 @@ +#!/bin/bash +docker rm $(docker ps -a -q) diff --git a/bin/docker-clean-images b/bin/docker-clean-images new file mode 100755 index 0000000..7f6dce2 --- /dev/null +++ b/bin/docker-clean-images @@ -0,0 +1,2 @@ +#!/bin/bash +docker rmi $(docker images -q --filter "dangling=true") diff --git a/bin/git-blameconflict b/bin/git-blameconflict new file mode 100755 index 0000000..0012c6f --- /dev/null +++ b/bin/git-blameconflict @@ -0,0 +1,3 @@ +#!/bin/bash + +for f in $(git status --porcelain|grep '^UU'|awk '{print $2}'); do echo "$f"; git --no-pager blame -L '/^<<<>>>/' -- $f; echo; done; diff --git a/recipes/base b/recipes/base index 2981cc4..174282a 100644 --- a/recipes/base +++ b/recipes/base @@ -4,3 +4,4 @@ set +e _recipe brew _recipe git _recipe zsh +_recipe bin diff --git a/recipes/bin b/recipes/bin new file mode 100644 index 0000000..2d1f327 --- /dev/null +++ b/recipes/bin @@ -0,0 +1,5 @@ +#!/bin/bash +set +e + +_recipe path +_run "Add dotfiles/bin to PATH" _path_high ${HOME}/dotfiles/bin diff --git a/recipes/path b/recipes/path new file mode 100644 index 0000000..a09962c --- /dev/null +++ b/recipes/path @@ -0,0 +1,18 @@ +#!/bin/bash +set +e + +function _path_low { + PATH="$1:$PATH" + test -r ~/.bash_profile && echo "export PATH='$1'":'"$PATH"' >>~/.bash_profile + echo "export PATH='$1'":'"$PATH"' >>~/.profile +} + +function _path_high { + PATH="$PATH:$1" + test -r ~/.bash_profile && echo 'export PATH="$PATH"':"'$PATH'" >>~/.bash_profile + echo "export PATH='$1'":'"$PATH"' >>~/.profile +} + +function _path { + _path_low $@ +}