-
-
Save rtrouton/3189010e42b67e14ecf8 to your computer and use it in GitHub Desktop.
Postinstall script for installing DNAStar Lasergene 13.x and later
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Determine working directory | |
install_dir=`dirname $0` | |
# Install DNAStar using InstallBuilder's unattended mode | |
$install_dir/"DNASTAR Lasergene Installer.app/Contents/MacOS/installbuilder.sh" --mode unattended | |
# When installing DNAStar with root privileges using InstallBuilder's unattended mode, it will install | |
# files and directories using the following permissions: | |
# | |
# Owner: system (aka root): read/write/execute permissions | |
# | |
# Group: staff: read/execute permissions | |
# | |
# Everyone: read/execute permissions | |
# | |
# | |
# This section fixes the permissions on the referenced files so that they're set to the following: | |
# | |
# Owner: system (aka root): read/write/execute permissions | |
# | |
# Group: admin: read/write/execute permissions | |
# | |
# Everyone: read/execute permissions | |
# | |
# Fixing /Applications/DNASTAR | |
/usr/bin/find "$3/Applications/DNASTAR" ! -group admin -exec chown root:admin {} \; | |
/usr/bin/find "$3/Applications/DNASTAR" ! -perm 775 -exec chmod 775 {} \; | |
# Fixing /Library/Application Support/DNASTAR | |
/usr/bin/find "$3/Library/Application Support/DNASTAR" ! -group admin -exec chown root:admin {} \; | |
/usr/bin/find "$3/Library/Application Support/DNASTAR" ! -perm 775 -exec chmod 775 {} \; | |
# Fixing DNAStar-installed fonts | |
# This section fixes the permissions on the referenced font files so that they're set to the following: | |
# | |
# Owner: system (aka root): read/write/execute permissions | |
# | |
# Group: wheel: read/execute permissions | |
# | |
# Everyone: read/execute permissions | |
# | |
/usr/bin/find "$3/Library/Fonts/protein chem &spaceBW" ! -group wheel -exec chown root:wheel {} \; | |
/usr/bin/find "$3/Library/Fonts/protein chem &spaceBW" ! -perm 755 -exec chmod 755 {} \; | |
/usr/bin/find "$3/Library/Fonts/ProtePla" ! -group wheel -exec chown root:wheel {} \; | |
/usr/bin/find "$3/Library/Fonts/ProtePla" ! -perm 755 -exec chmod 755 {} \; | |
/usr/bin/find "$3/Library/Fonts/ProteSpaBW" ! -group wheel -exec chown root:wheel {} \; | |
/usr/bin/find "$3/Library/Fonts/ProteSpaBW" ! -perm 755 -exec chmod 755 {} \; | |
# Read the the DNAStar install log into /var/log/install.log then delete | |
# the DNAStar install log from /Applications/DNASTAR | |
if [[ -e "$3/Applications/DNASTAR/Lasergene 13 Install.log" ]]; then | |
/bin/cat "$3/Applications/DNASTAR/Lasergene 13 Install.log" | |
/bin/rm "$3/Applications/DNASTAR/Lasergene 13 Install.log" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment