aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-advisories/templates/update_script
blob: 0f1ce6a7e2c0538b0f90b22051e6b9c4ffdda4df (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 %>." >&2
	exec /usr/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 mksite