why does echo need two >s

This commit is contained in:
Erica Portnoy 2020-07-13 19:11:29 -07:00
parent 2351260d1d
commit 04238e050b
2 changed files with 7 additions and 7 deletions

View file

@ -4,15 +4,15 @@
cb_installed="$(snapctl get cb-installed)"
if [ -z "$cb_installed" ]; then
echo "cb_installed not set, not doing version comparison check" > "$SNAP_DATA/debuglog"
echo "cb_installed not set, not doing version comparison check" >> "$SNAP_DATA/debuglog"
exit 0
fi
echo "cb_installed: $cb_installed" > "$SNAP_DATA/debuglog" > "$SNAP_DATA/debuglog"
echo "cb_installed: $cb_installed" >> "$SNAP_DATA/debuglog"
# get required certbot version for plugin
cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
echo "cb_required: $cb_required" > "$SNAP_DATA/debuglog"
echo "cb_required: $cb_required" >> "$SNAP_DATA/debuglog"
if [ "$cb_installed" -lt "$cb_required" ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before \

View file

@ -3,12 +3,12 @@
first_install="$(snapctl get first-install)"
if [ -z "$first_install" ]; then
snapctl set first-install="false"
echo "first install, not doing any version comparison checks" > "$SNAP_DATA/debuglog"
echo "first install, not doing any version comparison checks" >> "$SNAP_DATA/debuglog"
exit 0
fi
echo "ls $SNAP/certbot-shared:" > "$SNAP_DATA/debuglog"
ls $SNAP/certbot-shared > "$SNAP_DATA/debuglog"
echo "ls $SNAP/certbot-shared:" >> "$SNAP_DATA/debuglog"
ls $SNAP/certbot-shared >> "$SNAP_DATA/debuglog"
cb_installed=$(grep -oP "__version__ = '\K.*(?=')" $SNAP/certbot-shared/__init__.py)
echo "cb_installed: $cb_installed" > "$SNAP_DATA/debuglog"
echo "cb_installed: $cb_installed" >> "$SNAP_DATA/debuglog"
snapctl set cb-installed="$cb_installed"