浏览代码

Clobber repo file

bryan 4 天之前
父节点
当前提交
9b978e43b7
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      installJRMC

+ 4 - 0
installJRMC

@@ -653,6 +653,10 @@ install_mc_repo() {
       ;;
   esac
 
+  if [[ -f $repo_file ]]; then
+    ask_ok "Replace existing $repo_file repository file" && execute sudo rm -f "$repo_file" 
+  fi
+
   echo "Adding MC repository file: $repo_file"
   debug "repo_text: $repo_text"
   sudo tee "$repo_file" &>/dev/null <<< "$repo_text"