summaryrefslogtreecommitdiff
path: root/select
blob: 5464c7d1a6251c491b64a0efc334a6574e0532cd (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
# Select a repo (for later git commands to operate on)

if [ $# -ne 1 ]; then
	echo "Syntax: $0 <name>" >&2
	exit 1
fi

if [ ! -O "$HOME/$1.git" ]; then
	echo "$0: error: you must own the repo you want to operate on" >&2
	exit 1
fi

echo "$HOME/$1.git" >"$HOME/.selection"