PageRenderTime 39ms CodeModel.GetById 32ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/core/10.4/packaging/macfuse-core/Install_resources/preflight

http://macfuse.googlecode.com/
Shell | 44 lines | 21 code | 9 blank | 14 comment | 3 complexity | b404b665c26d1984cd5b59ec2c11b59a MD5 | raw file
 1#!/bin/sh
 2#
 3# Copyright (C) 2006 Google. All Rights Reserved.
 4#
 5PACKAGE_PATH=$1
 6INSTALL_PATH=$2
 7INSTALL_VOLUME=$3
 8SYSTEM_ROOT=$4
 9
10## MacFUSE File System Bundle
11
12# We originally screwed up the version number in fusefs.fs, so until we are
13# > version 1.0, we need to blow this away every time :-(
14if [ -d "$INSTALL_VOLUME/System/Library/Filesystems/fusefs.fs" ]
15then
16  /bin/rm -rf "$INSTALL_VOLUME/System/Library/Filesystems/fusefs.fs"
17fi
18
19## MacFUSE Kernel Extension
20
21if [ -d "$INSTALL_VOLUME/Library/Extensions/fusefs.kext" ]
22then
23  /bin/rm -rf "$INSTALL_VOLUME/Library/Extensions/fusefs.kext"
24fi
25
26# We originally installed the kernel extension in /System/Library/Extensions.
27# If it is there before this install, then we'll remove it and touch the
28# parent directory.
29if [ -d "$INSTALL_VOLUME/System/Library/Extensions/fusefs.kext" ]
30then
31  /bin/rm -rf "$INSTALL_VOLUME/System/Library/Extensions/fusefs.kext"
32  /usr/bin/touch "$INSTALL_VOLUME/System/Library/Extensions"
33fi
34
35## MacFUSE User Library
36
37# Remove any incompatible versions of libfuse we might have installed.
38/bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/libfuse.*
39/bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/libulockmgr.*
40/bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/pkgconfig/fuse.pc
41
42## Signal success
43
44exit 0