aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/grep.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/profile.d/grep.sh')
-rw-r--r--sh/profile.d/grep.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/sh/profile.d/grep.sh b/sh/profile.d/grep.sh
deleted file mode 100644
index d6f9c36b..00000000
--- a/sh/profile.d/grep.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-# Test that we have metadata about what options this system's grep(1) supports,
-# and try to create it if not
-(
- # Create a directory to hold metadata about grep
- gcd=$HOME/.cache/grep
- if ! [ -d "$gcd" ] ; then
- mkdir -p -- "$gcd" || exit
- fi
-
- # Write grep(1)'s --help output to a file, even if it's empty
- if ! [ -f "$gcd"/help ] ; then
- grep --help </dev/null >"$gcd"/help 2>/dev/null || exit
-
- # Iterate through some useful options and create files to show they're
- # available
- set -- binary-files \
- color \
- devices \
- directories \
- exclude \
- exclude-dir
- for opt ; do
- grep -q -- --"$opt" "$gcd"/help || continue
- touch -- "$gcd"/"$opt" || exit
- done
- fi
-)