在用Typora导出word时提示需要安装Pandoc,Pandoc有两种安装方式,第一种是通过安装器安装

第二种方式是使用brew
brew install pandoc
但如果你使用第一种方式安装了,但想卸载了使用第二种方式安装,该怎么卸载呢?
#!/usr/bin/perl
# Script to remove all files installed by the macOS pandoc installer
# and unregister the package. Modified from a script contributed
# by Daniel T. Staal.
use warnings;
use strict;
use File::Spec;
# The main info: this is the list of files to remove and the pkg_id.
my $pkg_id = 'net.johnmacfarlane.pandoc';
# Find which, if any, volume Pandoc is installed on.
my $volume;
# First check /, then other volumes on the box.
my $cur_test = `pkgutil --pkgs=$pkg_id`;
if ( $cur_test =~ m/$pkg_id/ ) {
$volume = '/';
} else {
opendir( my
Mac上卸载Pandoc的传统安装与Homebrew安装方法

本文介绍如何在已经通过安装器安装Pandoc后,切换至Homebrew进行管理和卸载,提供了一个脚本示例,以及关于Homebrew优势的讨论。
最低0.47元/天 解锁文章
878





