/core/10.5/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. #
  5. PACKAGE_PATH=$1
  6. INSTALL_PATH=$2
  7. INSTALL_VOLUME=$3
  8. SYSTEM_ROOT=$4
  9. ## MacFUSE File System Bundle
  10. # We originally screwed up the version number in fusefs.fs, so until we are
  11. # > version 1.0, we need to blow this away every time :-(
  12. if [ -d "$INSTALL_VOLUME/System/Library/Filesystems/fusefs.fs" ]
  13. then
  14. /bin/rm -rf "$INSTALL_VOLUME/System/Library/Filesystems/fusefs.fs"
  15. fi
  16. ## MacFUSE Kernel Extension
  17. if [ -d "$INSTALL_VOLUME/Library/Extensions/fusefs.kext" ]
  18. then
  19. /bin/rm -rf "$INSTALL_VOLUME/Library/Extensions/fusefs.kext"
  20. fi
  21. # We originally installed the kernel extension in /System/Library/Extensions.
  22. # If it is there before this install, then we'll remove it and touch the
  23. # parent directory.
  24. if [ -d "$INSTALL_VOLUME/System/Library/Extensions/fusefs.kext" ]
  25. then
  26. /bin/rm -rf "$INSTALL_VOLUME/System/Library/Extensions/fusefs.kext"
  27. /usr/bin/touch "$INSTALL_VOLUME/System/Library/Extensions"
  28. fi
  29. ## MacFUSE User Library
  30. # Remove any incompatible versions of libfuse we might have installed.
  31. /bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/libfuse.*
  32. /bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/libulockmgr.*
  33. /bin/rm -f "$INSTALL_VOLUME"/usr/local/lib/pkgconfig/fuse.pc
  34. ## Signal success
  35. exit 0