erlang mac os 10.9 卸载脚本
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "Insufficient permissions. Use sudo or root account." 1>&2
exit 1
fi
my_default_prompt=0
if test "$#" != "0"; then
if test "$#" != "1" -o "$1" != "--force"; then
echo "Error: Unknown argument(s): $*"
echo ""
echo "Usage: uninstall.tool [--force]"
echo ""
echo "If the '--force' option is not given, you will be prompted"
echo "for a Yes/No before doing the actual uninstallation."
echo ""
exit 4;
fi
my_default_prompt="Yes"
fi
if test "$my_default_prompt" != "Yes"; then
echo "Do you wish to uninstall EslErlang (Yes/No)?"
read my_answer
if test "$my_answer" != "Yes" -a "$my_answer" != "YES" -a "$my_answer" != "yes"; then
echo "Aborting uninstall. (answer: '$my_answer')".
exit 2;
fi
echo ""
fi
echo "Removing files"
for p in "com.erlang-solutions.Erlang" "com.erlang-solutions.Erlang.Updater"; do
FILES=`/usr/sbin/pkgutil --files ${p} 2>/dev/null`
for s in $FILES; do
if [ -f "/${s}" -o -h "/${s}" ]; then
rm "/${s}" #if s is dir it will not be removed
fi
done
#reverse oreder becouse if dir A has empty dir B then A cannot be removed and when we reverse
#we get the dippest directory first so everything works
DIRS=`/usr/sbin/pkgutil --files ${p} 2>/dev/null --only-dirs | awk '{x = $0 "\n" x} END {printf "%s", x}'`
for d in $DIRS; do
if [ -d "/${d}" ]; then
rmdir "/${d}" 2>/dev/null
fi
done
echo "Cleaning up"
pkgutil --forget $p 2>/dev/null
done
osascript -e 'tell application "System Events" to delete login item "EslErlangUpdater"' 2>/dev/null
echo "Uninstallation completed"
erlang mac os 10.9 卸载脚本的更多相关文章
- 解锁 vmware esxi 6.7 并安装 mac os 10.13
1.安装 esxi 6.7 2.下载 unlocker 2.1.1.zip 3.上传 unlocker 2.1.1.zip esxi的磁盘中 4.开启esxi的ssh登录 5.使用 ssh 登录 es ...
- Mac OS 10.12 - 安装Homebrew,像Ubuntu里面的apt一样简单地安装和删除软件!
Homebrew — macOS 不可或缺的套件管理器,Homebrew官方网站如此介绍自己!!! 中文官网:https://brew.sh/index_zh-cn.html 一,安装 打开shell ...
- 虚拟机(VMware12 pro)安装Mac OS 10.10
下载VMware12pro,Mac OS 10.10.ios,虚拟机破解: 在虚拟机中创建新虚拟机://http://cdnnn.07net01.com/linux/2016/01/1130384.h ...
- mac os 10.10上安装my eclipse显示virtual memory不足,解决方案
mac os 10.10上安装my eclipse显示virtual memory不足,安装失败. 自从把OS 升级到10.10 之后, 各种问题, 安装的时候向导提示提示我们说没有足够的虚拟内存, ...
- [xUnix 开发环境--01] MAMP mac os 10.10 配置经历、要点——01. phpmyadmin连不上
Mac OS 10.10已经自带了apache2和php(php的路径我至今还没不知道,太懒没去找) 用brew安装mysql, 在官网上下载了phpmyadmin,按官方方式配置完后,登录不上,也不 ...
- Mac OS 10.10 Yosemite正式版怎么升级 升级教程
苹果在2014年10月17号凌晨一点召开了新品发布会,推出了新的 iPad.iMac 产品,以及大家一直所期盼的 Mac OS 10.10 正式版系统.个人是从 Mac OS 10.10 的第一个测试 ...
- win下vm10+mac os 10.9安装遇到问题
在windows 8下安装vm10.0.0+mac os 10.9遇到问题记录例如以下: 一.因为之前我装的vm9+mac os 10.7: 二.准备安装mac os 10.9,把vm9换成vm10: ...
- VMware15安装MAC(MAC OS 10.13)(OS X 10.14)原版可升级最新可解锁macOS Unlocker3.0(OS X 10.13)
目录树 1.1.2安装环境: 1.1.3所需资源: 1.1.4 Unlocker 3.0解锁 1.1.5 配置环境 1.1.6开始安装 1.1.7开启虚拟机进入MAC安装界面 1.1.8 macO ...
- VirtualBox虚拟机安装Mac OS 10.12
注:本文作者 (QQ:85805214) 本博主只是转载发布而已. VMware 安装Mac OS 方法 由于Virtual Box拷贝文件比较麻烦,有时候经常出现拷贝失败的情况,故使用VMware ...
随机推荐
- 安卓log4k问题解决
1.直接上代码 //log4k问题 public static void log(String tag, String str) { int index = 0; // 当前位置 int max = ...
- 2015.5.2-2015.5.8 Tip jQuery ,前端组件库,inline-block元素间距等
有忙于它事,故延迟了,但在坚持! 1.Tip jQuery 2.给span加display: inline-block; 怎样能对齐? 解决方法:vertical-align: bottom: ...
- javascript操作referer
Referrer的重要性 HTTP请求中有一个referer的报文头,用来指明当前流量的来源参考页.例如在www.sina.com.cn/sports/上点击一个链接到达cctv.com首页,那么就r ...
- FindWindowEx用法
函数原型:HWND FindWindowEx(HWND hwndParent,HWND hwndChildAfter,LPCTSTR lpszClass,LPCTSTR lpszWindow): 参数 ...
- ASP.NET 对于文件的下载与上传
/// <summary> /// 下载附件查看 /// </summary> /// <param name="sender"></pa ...
- JavaScript深入浅出6-函数和作用域
慕课网教程视频地址:Javascript深入浅出 函数的概念:定义一次可调用多次的javascript代码段 创建函数:声明 function fuc(){} 声明前置 表达式 var fuc= ...
- 【Maven】Eclipse安装Maven插件后导致Eclipse启动出错
本文纯属复制粘贴:具体请参照原文: Eclipse安装Maven插件后,Eclipse启动问题:Maven Integration for Eclipse JDK Warning. 解决方法: 1. ...
- XmlException: 名称不能以“<”字符(十六进制值 0x3C)开头
svn 版本冲突引起的: 产看config 文件里面的内容是否冲突,这个问题可能和代码无关
- js函数中this的不同含义
1.js函数调用过程中,js线程会进入新的执行环境并创建该环境的变量对象,并添加两个变量:this和arguments,因此可以在函数中使用这两个变量.需要注意的是,this变量不能重新赋值,而arg ...
- upload&&download
package am.demo; import java.io.File; import java.io.IOException; import java.util.Iterator; imp ...