summaryrefslogtreecommitdiffstats
path: root/find.sh
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-01-02 13:22:21 +0200
committerLauri Ojansivu <x@xet7.org>2019-01-02 13:22:21 +0200
commit548d095223b52de74c29e0f67f12848503bc95ee (patch)
tree781a639429916a0319f017453dcae3cec53e6b46 /find.sh
parent1683bcb3e5980d3af4a07c4bb22e534b98eff862 (diff)
downloadwekan-548d095223b52de74c29e0f67f12848503bc95ee.tar.gz
wekan-548d095223b52de74c29e0f67f12848503bc95ee.tar.bz2
wekan-548d095223b52de74c29e0f67f12848503bc95ee.zip
- Add find.sh bash script that ignores extra directories when searching.
xet7 uses this a lot when developing. Thanks to xet7 !
Diffstat (limited to 'find.sh')
-rwxr-xr-xfind.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/find.sh b/find.sh
new file mode 100755
index 00000000..b552866e
--- /dev/null
+++ b/find.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Find text from all subdirectories
+# and ignore all temporary directories:
+# - node-modules = installed node modules
+# - .build = Wekan bundle that is combined from source. Do not edit these, these are deleted and recreated.
+# - .meteor = Meteor version, packages etc at .meteor/local
+# - .git = git history
+
+# If less or more that 1 parameter, show usage.
+if (( $# != 1 )); then
+ echo 'Usage: ./find.sh text-to-find'
+ exit 0
+fi
+
+find . | grep -v node_modules | grep -v .build | grep -v .meteor | grep -v .git | xargs grep --no-messages $1 | less