Add logic to check for existence of files before interacting with them

if ${rcvar} or ${rcvar}.new don't exist, we can't rm/mv them.
remotes/origin/2.0
Jake Guffey 13 years ago
parent 34ca94ffa2
commit a1793f66ff
  1. 4
      conf/type/__pf_ruleset/gencode-remote

@ -36,6 +36,6 @@ fi
rcvar=$(cat "$__object/explorer/rcvar")
# --state absent, so ensure that .new doesn't exist and that conf is renamed to .old
echo rm \"${rcvar}.new\"
echo mv \"${rcvar}\" \"${rcvar}.old\"
echo "[ -f \"${rcvar}.new\" ] && rm \"${rcvar}.new\""
echo "[ -f \"${rcvar}\" ] && mv \"${rcvar}\" \"${rcvar}.old\""

Loading…
Cancel
Save