Code tagged with osx

Manpage fix for programs installed via MacPorts on OSX

export MANPATH=/opt/local/share/man:$MANPATH
Language Shell/Scripting / Tagged with osx, git, man

MacOS X periodic cleanup script/fix

Posted by Chad Humphries over 2 years ago
Runs all periodic cleanup scripts on MacOS X in order (daily, weekly, monthly). Also fixes locate database problem where its owner and permissions get changed so that the next run of the weekly script fails trying to rebuild it.

#!/bin/bash
# Shortcut script for periodic cleanup scripts
# Also fixes locate database permissions
# Written by Niels Heidenreich, 2006-01-19

sudo /etc/daily
ldb="/private/var/db/locate.database"
if [ -f $ldb ]
then
	sudo chown root:wheel $ldb
	sudo chmod 644 $ldb
fi
sudo /etc/weekly
sudo /etc/monthly
Language Shell/Scripting / Tagged with osx