Merge pull request #43 from rpdelaney/master
Eliminated dependency on 'grep -P'
This commit is contained in:
commit
06ccb64c5a
|
@ -17,6 +17,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Functions {{{1
|
# Functions {{{1
|
||||||
|
lscolors_buildsuite_print_extensions() {
|
||||||
|
sed -r -e '/^[ ]+#/d; /^[^\.\*]/d; /^$/d; s/^([\.\*][^ ]+).*/\1/' ../LS_COLORS
|
||||||
|
}
|
||||||
|
|
||||||
verbose() {
|
verbose() {
|
||||||
if [[ "$verbose" = "1" ]]; then
|
if [[ "$verbose" = "1" ]]; then
|
||||||
echo "$1" >&2
|
echo "$1" >&2
|
||||||
|
@ -114,13 +118,14 @@ chmod 0777 WORLDWRITEABLE
|
||||||
# Supported extensions
|
# Supported extensions
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ ! -f test"$line" ]]; then
|
if [[ ! -f test"$line" ]]; then
|
||||||
line="${line//\*/}"
|
line="${line//\*/.}"
|
||||||
if [[ "${line:0:1}" == "." ]]; then
|
if [[ "${line:0:1}" == "." ]]; then
|
||||||
touch ./DIRECTORY/test"$line"
|
touch ./DIRECTORY/test"$line"
|
||||||
else
|
else
|
||||||
touch ./DIRECTORY/"$line"
|
touch ./DIRECTORY/"$line"
|
||||||
fi
|
fi
|
||||||
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:
|
# vim: ft=sh foldmethod=marker:
|
||||||
|
|
Loading…
Reference in New Issue