aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-advisories/templates/update_script
blob: 71d8d1d484b1456f1c3954f6288fe485bdf3ade8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
set -e

if [ "$UID" = "0" ]; then
	echo "Re-running as '<%= @mgaadv_login %>' user." >&2
	exec /bin/su -c <%= @update_script %> - <%= @mgaadv_login %>
fi

if [ "$USER" != "<%= @mgaadv_login %>" ]; then
	echo "This script must be run as the <%= @mgaadv_login %> user." >&2
	exit 1
fi

cd <%= @advisories_dir %>
svn up
exec /usr/bin/mgaadv process