mirror of
https://github.com/correl/dotfiles.git
synced 2024-12-22 19:17:34 +00:00
Add scripts
This commit is contained in:
parent
d699950ad3
commit
0bb22304e0
6 changed files with 31 additions and 0 deletions
2
bin/docker-clean-containers
Executable file
2
bin/docker-clean-containers
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker rm $(docker ps -a -q)
|
2
bin/docker-clean-images
Executable file
2
bin/docker-clean-images
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker rmi $(docker images -q --filter "dangling=true")
|
3
bin/git-blameconflict
Executable file
3
bin/git-blameconflict
Executable file
|
@ -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;
|
|
@ -4,3 +4,4 @@ set +e
|
||||||
_recipe brew
|
_recipe brew
|
||||||
_recipe git
|
_recipe git
|
||||||
_recipe zsh
|
_recipe zsh
|
||||||
|
_recipe bin
|
||||||
|
|
5
recipes/bin
Normal file
5
recipes/bin
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set +e
|
||||||
|
|
||||||
|
_recipe path
|
||||||
|
_run "Add dotfiles/bin to PATH" _path_high ${HOME}/dotfiles/bin
|
18
recipes/path
Normal file
18
recipes/path
Normal file
|
@ -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 $@
|
||||||
|
}
|
Loading…
Reference in a new issue