File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ parse_hooks_and_setvar() {
659
659
shshrc_get_all_existing_install_cmd () {
660
660
set +e
661
661
if [ -e " $SHSHRC " ]; then
662
- existing=" $( sed -n ' s/^\s *shsh install \(.*\)$/\1/p' " $SHSHRC " ) "
662
+ existing=" $( sed -n ' s/^[[:space:]] *shsh install \(.*\)$/\1/p' " $SHSHRC " ) "
663
663
echo " $existing "
664
664
fi
665
665
}
@@ -670,14 +670,14 @@ shshrc_get_existing_install_cmd() {
670
670
# given $1 as the package name, return the existing line in SHSHRC that installs
671
671
# that package
672
672
if [ -e " $SHSHRC " ]; then
673
- existing=" $( grep -E " ^\s *shsh install (.*\s +)?$1 (\s .*)?$" " $SHSHRC " ) "
673
+ existing=" $( grep -E " ^[[:space:]] *shsh install (.*[[:space:]] +)?$1 ([[:space:]] .*)?$" " $SHSHRC " ) "
674
674
# extract suffix if any (e.g. '&& \' or '|| \')
675
- _ending_pattern=' \s +([&][&]|[|][|])\s *[\]\s *$'
675
+ _ending_pattern=' [[:space:]] +([&][&]|[|][|])[[:space:]] *[\][[:space:]] *$'
676
676
existing_suffix=" $( echo " $existing " | grep -oE " $_ending_pattern " ) "
677
677
# extract prefix if any (i.e. white spaces)
678
- existing_prefix=" $( echo " $existing " | grep -oE " ^\s *" ) "
678
+ existing_prefix=" $( echo " $existing " | grep -oE " ^[[:space:]] *" ) "
679
679
# remove these from the statement for comparison
680
- existing=" $( echo " $existing " | sed -E " s/$_ending_pattern //; s/^(\s *)//" ) "
680
+ existing=" $( echo " $existing " | sed -E " s/$_ending_pattern //; s/^([[:space:]] *)//" ) "
681
681
fi
682
682
export existing
683
683
export existing_prefix
You can’t perform that action at this time.
0 commit comments