diff options
author | Karel Kočí <cynerd@email.cz> | 2016-10-21 11:30:46 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-10-21 11:30:46 +0200 |
commit | 25b41b0a0d60aed0a7f49fabe79c47b5a354eae7 (patch) | |
tree | c50ac1f7f3c056a0a0567d853221a71eb2c53ac5 | |
parent | b65a3c7395af30c49fd7eb7b5fb90d459d8238d0 (diff) | |
parent | 42c30f71f4a2d70faa46d87171606da664a877cb (diff) | |
download | myconfigs-25b41b0a0d60aed0a7f49fabe79c47b5a354eae7.tar.gz myconfigs-25b41b0a0d60aed0a7f49fabe79c47b5a354eae7.tar.bz2 myconfigs-25b41b0a0d60aed0a7f49fabe79c47b5a354eae7.zip |
Merge branch 'master' of git.cynerd.cz:myconfigs
-rwxr-xr-x | local/bin/project-test | 43 | ||||
-rw-r--r-- | shellrc | 6 |
2 files changed, 43 insertions, 6 deletions
diff --git a/local/bin/project-test b/local/bin/project-test new file mode 100755 index 0000000..a0591d8 --- /dev/null +++ b/local/bin/project-test @@ -0,0 +1,43 @@ +#!/bin/bash +# Executes given command on all commits from current one to given one. +set -e + +print_help() { + echo "Executes given command for each commit. In default it executes" + echo "for 10 previous commands." + echo + echo "Usage: project-test [OPTION...] [--] COMMAND" + echo " -r,--ref [REF]" + echo " Git reference to go to" + echo " -c,--count [COUNT]" + echo " Tests given count of references back from current one." +} + +while [ -n "$1" ]; do + case $1 in + -r|--ref) + shift + REF=$1 + ;; + -c|--count) + shift + REF=HEAD~$1 + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + +[ -n "$REF" ] || REF=HEAD~10 + +while read -r rev; do + git checkout "$rev" + git submodule update + eval $@ +done < <(git rev-list "$REF"..HEAD) @@ -32,12 +32,6 @@ alias gst='git status' alias v='vim' alias i='i3-msg' -# Systemd aliases -alias sctl='sudo systemctl' -alias usctl='systemctl --user' -alias jrn='journalctl' -alias ujrn='jrn --user' - genpasswd() { local l=$1 if [ "$l" = "" ]; then l=16; fi |