aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/22_forge/files/git-shell-commands/describe
blob: 46451bf7b128b2f2ab695f879a43dab217ee4bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e
if [ "$#" -ne 2 ]; then
    echo "Usage: describe [REPO_NAME] [DESCRIPTION]"
    echo "Note: quote the description if it contains spaces"
    exit 1
fi
if [ ! -d "$1.git" ]; then
    echo "Repository $1 does not exist"
    exit 1
fi
echo "$2" > "$1.git/description"
echo "Updated description for $1"