Skip to content
/ dircheck Public

Command line utility to quickly check for changes in a directory tree.

Notifications You must be signed in to change notification settings

jum/dircheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

dircheck.go

A small command line utility to quickly check for changes to a set of directories written in the go language.

For example a ~/Library/LaunchAgent file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>org.mager.launchctl</string>

  <key>LowPriorityIO</key>
  <true/>

  <key>Program</key>
  <string>/Users/jum/bin/launchctl.sh</string>

  <key>WatchPaths</key>
  <array>
    <string>/Users/jum/Library/LaunchAgents</string>
    <string>/Library/LaunchAgents</string>
    <string>/Library/LaunchDaemons</string>
    <string>/System/Library/LaunchAgents</string>
    <string>/System/Library/LaunchDaemons</string>
  </array>

  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>

With the associated shell script:

#!/bin/sh
PATH=$HOME/gopkg/bin:$PATH
(
	echo `date +'%Y%m%dT%H%M%S'`
	dircheck -f ~/.dircheck_launch ~/Library/LaunchAgents /Library/Launch* /System/Library/Launch*
) | open -f
exit 0

A console will popup as soon as there are any changes to the launch daemon config files.

About

Command line utility to quickly check for changes in a directory tree.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages