Merge pull request #43 from rpdelaney/master

Eliminated dependency on 'grep -P'
This commit is contained in:
Ryan Delaney 2015-12-09 10:33:49 -08:00
commit 06ccb64c5a
1 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,10 @@
#
# Functions {{{1
lscolors_buildsuite_print_extensions() {
sed -r -e '/^[ ]+#/d; /^[^\.\*]/d; /^$/d; s/^([\.\*][^ ]+).*/\1/' ../LS_COLORS
}
verbose() {
if [[ "$verbose" = "1" ]]; then
echo "$1" >&2
@ -114,13 +118,14 @@ chmod 0777 WORLDWRITEABLE
# Supported extensions
while read line; do
if [[ ! -f test"$line" ]]; then
line="${line//\*/}"
line="${line//\*/.}"
if [[ "${line:0:1}" == "." ]]; then
touch ./DIRECTORY/test"$line"
else
touch ./DIRECTORY/"$line"
fi
fi
done < <(sed -r -e '/^[ ]+#/d; /^[^\.\*]/d; /^$/d' ../LS_COLORS | grep -Po '^[\.\*]([A-z0-9]+)' )
done < <( lscolors_buildsuite_print_extensions )
# vim: ft=sh foldmethod=marker: