Skip to content

Instantly share code, notes, and snippets.

@jessepeterson
jessepeterson / reponotify.py
Last active August 5, 2019 16:40
reposado update notification: reports changed Apple products between repo_sync runs
#!/usr/bin/python
'''
reposado update notification: reports changed Apple products between repo_sync runs
Checks the current list of updates versus the previous list of updates and
reports on the changes. Run this script after your repo_sync run to see the
changes between syncs. You can then hand this report off in email if you wish.
For example:
@phillymjs
phillymjs / reposado_update_notification.sh
Last active July 31, 2019 20:13
I wrote this script for myself and thought others might find it useful. Run it on your Reposado server, and it will check for current Apple updates that are not assigned to any of your branches. If it finds any, it will send an email notification. If you also use Margarita to provide a web interface, you can have the email include a link to that…
#!/bin/sh
# File locations - Change as needed
list="/tmp/updatelist.txt" # List of updates not in any branches
email="/tmp/updatemail.txt" # Temp file to hold the email message
mailbinary="/usr/sbin/sendmail" # Location of the binary that sends mail
repoutil="/usr/local/reposado/repoutil" # Location of the repoutil binary
# Options for automatically adding new updates to a branch - Change as desired
autoadd=true