Skip to content

Commit

Permalink
fix broken grep invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwall committed May 6, 2024
1 parent e47acca commit 4b13350
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ add_to_group() {
setup_defaults() {
dflts=/etc/default/weewx
if [ -f $dflts ]; then
WEEWX_PYTHON=$(grep "^WEEWX_PYTHON\s*=" | sed -e "s/WEEWX_PYTHON\s*=\s*//")
WEEWX_PYTHON=$(grep "^WEEWX_PYTHON\s*=" $dflts | sed -e "s/WEEWX_PYTHON\s*=\s*//")
if [ ! -z "$WEEWX_PYTHON" -a "$WEEWX_PYTHON" != "python3" ]; then
REPLACE_PYTHON=1
fi
WEEWX_BINDIR=$(grep "^WEEWX_BINDIR\s*=" | sed -e "s/WEEWX_BINDIR\s*=\s*//")
WEEWX_BINDIR=$(grep "^WEEWX_BINDIR\s*=" $dflts | sed -e "s/WEEWX_BINDIR\s*=\s*//")
if [ ! -z "$WEEWX_BINDIR" -a "$WEEWX_BINDIR" != "/usr/share/weewx" ]; then
REPLACE_BINDIR=1
fi
Expand Down
4 changes: 2 additions & 2 deletions pkg/weewx.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ set_permissions() {
setup_defaults() {
dflts=/etc/default/weewx
if [ -f $dflts ]; then
WEEWX_PYTHON=$(grep "^WEEWX_PYTHON\s*=" | sed -e "s/WEEWX_PYTHON\s*=\s*//")
WEEWX_PYTHON=$(grep "^WEEWX_PYTHON\s*=" $dflts | sed -e "s/WEEWX_PYTHON\s*=\s*//")
if [ ! -z "$WEEWX_PYTHON" -a "$WEEWX_PYTHON" != "python3" ]; then
REPLACE_PYTHON=1
fi
WEEWX_BINDIR=$(grep "^WEEWX_BINDIR\s*=" | sed -e "s/WEEWX_BINDIR\s*=\s*//")
WEEWX_BINDIR=$(grep "^WEEWX_BINDIR\s*=" $dflts | sed -e "s/WEEWX_BINDIR\s*=\s*//")
if [ ! -z "$WEEWX_BINDIR" -a "$WEEWX_BINDIR" != "/usr/share/weewx" ]; then
REPLACE_BINDIR=1
fi
Expand Down

0 comments on commit 4b13350

Please sign in to comment.