summaryrefslogtreecommitdiff
path: root/modules/hw-core/bash-lib-git
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2016-08-13 20:25:34 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-13 20:32:21 +0200
commitff6201921c7da018ec200ca52ed023e92c83f747 (patch)
treebe1b9a1b8376841b88c46b4c360e842b66cfd49c /modules/hw-core/bash-lib-git
parent86fc3b01f4867e28b58c07e2f86506f0549e3587 (diff)
created hw-core bash libraries
will be traited as a git subtree
Diffstat (limited to 'modules/hw-core/bash-lib-git')
-rwxr-xr-xmodules/hw-core/bash-lib-git/bin/git-subtree-list7
-rw-r--r--modules/hw-core/bash-lib-git/src/subtree.sh3
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/hw-core/bash-lib-git/bin/git-subtree-list b/modules/hw-core/bash-lib-git/bin/git-subtree-list
new file mode 100755
index 0000000000..d3af413e9c
--- /dev/null
+++ b/modules/hw-core/bash-lib-git/bin/git-subtree-list
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+source $CUR_DIR"/../src/subtree.sh"
+
+hwc_git_subtree_list
diff --git a/modules/hw-core/bash-lib-git/src/subtree.sh b/modules/hw-core/bash-lib-git/src/subtree.sh
new file mode 100644
index 0000000000..08820e6405
--- /dev/null
+++ b/modules/hw-core/bash-lib-git/src/subtree.sh
@@ -0,0 +1,3 @@
+function hwc_git_subtree_list() {
+ git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort | uniq
+}