home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / var / lib / dpkg / info / mono-common.postinst < prev    next >
Encoding:
Text File  |  2006-08-01  |  757 b   |  29 lines

  1. #!/bin/sh -e
  2.  
  3. if [ configure = "$1" ] && [ -x /usr/sbin/update-binfmts ]; then
  4.   /usr/sbin/update-binfmts --import cli
  5. fi
  6.  
  7. if [ configure = "$1" ] && [ -d /usr/share/dotnet/mono/ ] && ! [ -L /usr/share/dotnet/mono ]; then
  8.   if [ -L /usr/lib/mono ]; then
  9.     # it's a symlink
  10.     rm /usr/lib/mono
  11.   fi
  12.   if ! ( mkdir -p /usr/lib/mono && cp -af /usr/share/dotnet/mono/. /usr/lib/mono/ ); then
  13.     # unwind in case of error
  14.     rm -rf /usr/lib/mono
  15.     ln -s ../share/dotnet/mono /usr/lib/mono
  16.     exit 1
  17.   fi
  18.   rm -rf /usr/share/dotnet/mono
  19.   ln -s ../../lib/mono /usr/share/dotnet/mono
  20. fi
  21.  
  22. if [ configure = "$1" ] && ! [ -L /usr/share/dotnet/mono ]; then
  23.   # it's not a symlink
  24.   mkdir -p /usr/share/dotnet
  25.   ln -s ../../lib/mono /usr/share/dotnet/mono
  26. fi
  27.  
  28.  
  29.