source: trunk/scripts/git-hooks/super/update @ 2825

Last change on this file since 2825 was 2813, checked in by broder, 15 years ago

I don't trust test's boolean operators.

  • Property svn:executable set to *
File size: 606 bytes
RevLine 
[2500]1#!/bin/sh
2
3ref="$1"
4oldrev="$2"
5newrev="$3"
6
7# --- Safety check
8
9if [ -z "$GIT_DIR" ]; then
10        echo "Don't run this script from the command line." >&2
11        echo " (if you want, you could supply GIT_DIR then run" >&2
12        echo "  $0 <ref> <oldrev> <newrev>)" >&2
13        exit 1
14fi
15
[2813]16if [ -z "$ref" ] || [ -z "$oldrev" ] || [ -z "$newrev" ]; then
[2500]17        echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
18        exit 1
19fi
20
21# --- Disallow all pushes
22
[2802]23echo "*** Pushing to the superproject is not allowed" >&2
[2500]24echo "***" >&2
[2802]25echo "*** If you would like to update the superproject, use remctl" >&2
[2500]26exit 1
Note: See TracBrowser for help on using the repository browser.