From 45610db0fa1abcf47c2c8124278be13f65de397d Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 25 2020 18:16:33 +0000 Subject: Add sources defined in the spec file --- diff --git a/SPECS/GREP_COLORS b/SPECS/GREP_COLORS new file mode 100644 index 0000000..1ef53a6 --- /dev/null +++ b/SPECS/GREP_COLORS @@ -0,0 +1,4 @@ +# Configuration file for the color grep utility + +# 'none' shuts colorization off. +#COLOR none diff --git a/SPECS/colorgrep.csh b/SPECS/colorgrep.csh new file mode 100644 index 0000000..b3152a6 --- /dev/null +++ b/SPECS/colorgrep.csh @@ -0,0 +1,11 @@ + +# color-grep initialization + +/usr/libexec/grepconf.sh -c +if ( $status == 1 ) then + exit +endif + +alias grep 'grep --color=auto' +alias egrep 'egrep --color=auto' +alias fgrep 'fgrep --color=auto' diff --git a/SPECS/colorgrep.sh b/SPECS/colorgrep.sh new file mode 100644 index 0000000..cd0539c --- /dev/null +++ b/SPECS/colorgrep.sh @@ -0,0 +1,7 @@ +# color-grep initialization + +/usr/libexec/grepconf.sh -c || return + +alias grep='grep --color=auto' 2>/dev/null +alias egrep='egrep --color=auto' 2>/dev/null +alias fgrep='fgrep --color=auto' 2>/dev/null diff --git a/SPECS/grep-3.1.tar.xz b/SPECS/grep-3.1.tar.xz new file mode 100644 index 0000000..cd1ab0c Binary files /dev/null and b/SPECS/grep-3.1.tar.xz differ diff --git a/SPECS/grepconf.sh b/SPECS/grepconf.sh new file mode 100644 index 0000000..418af0b --- /dev/null +++ b/SPECS/grepconf.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +case "$1" in + -c | --interactive-color) + ! grep -qsi "^COLOR.*none" /etc/GREP_COLORS + ;; + *) + echo >&2 "Invalid / no option passed, so far only -c | --interactive-color is supported." + exit 1 + ;; +esac