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 ...
随机推荐
- .NET学习之路----我对P/Invoke技术的理解(一)
看了P/Invoke技术的介绍,于是想写下点东西,东西包含两个部分:知识的纪录和我的理解及疑问. r托管代码中调用非托管API函数的过程 1.定位包含API的DLL: 2.载入DLL 3.找到DLL中 ...
- mui jquery 同时使用
(function ($, doc, $$) { $.init(); $.ready(function () { var cityPicker = new $.PopPicker({ layer: } ...
- C# 中的委托和事件(转)
引言 委托 和 事件在 .Net Framework中的应用非常广泛,然而,较好地理解委托和事件对很多接触C#时间不长的人来说并不容易.它们就像是一道槛儿,过了这个槛的人,觉得真是太容易了,而没有过去 ...
- ActiveMQ启动多个broker
具体步骤如下: 1.把activemq目录下的conf文件复制一份,叫做conf2, 命令: cp -r conf conf2 2.修改conf2目录下的activemq.xml文件 a.修改brok ...
- SHLVL 和 BASH_SUBSHELL 两个变量的区别
SHLVL 是记录多个 Bash 进程实例嵌套深度的累加器,而 BASH_SUBSHELL 是记录一个 Bash 进程实例中多个子 Shell(subshell)嵌套深度的累加器. 看不懂上面这句话不 ...
- 线程的创建pthread_create.c
#include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <errno.h&g ...
- Windows平台下Qt中glut库的使用
用Qt中的QGLWidget窗体类中是不包括glut工具库的,难怪在myGLWidget(在我的程序中是QGLWidget的派生类)中绘制实心球体是说“glutSolidSphere”: 找不到标识符 ...
- PHP中如何在数组中随机抽取n个数据的值 - array_rand()?
PHP中如何在数组中随机抽取n个数据的值? 最佳答案 array_rand() 在你想从数组中取出一个或多个随机的单元时相当有用.它接受 input 作为输入数组和一个可选的参数 num_req,指明 ...
- js parseInt 显示0
parseInt 有第二个参数, 就是进制参数 parseInt("08", 10); //表示这个数字是十进制的就不会出错了.
- linux网络配置
VMware下,centos系统,安装好后,一直连不上外网.在网上查了好多资料,都没有找到解决的办法.最后,把自己的解决方案,写到下面. 其中ipaddr是window下vmnet8的ip地址,在do ...