summaryrefslogtreecommitdiff
path: root/rename
blob: afa951e579dd96ae552958196618c9c8c0df334a (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Rename a repo

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


if [[ $1 == *..* ]]; then
	echo "No .." >&2
	exit 1
fi
if [[ $2 == *..* ]]; then
	echo "No .." >&2
	exit 1
fi

mv --no-target-directory "$HOME/$1.git" "$HOME/$2.git"