aboutsummaryrefslogtreecommitdiff
path: root/src/git-permalink.sh
blob: 13231ec2d0e19a481cabad7a84cfc2e653c51f94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -eu

usage() {
	cat <<EOF
	$0 FILE [REF]
EOF
}

FILE="${1:-}"
if [ -z "$FILE" ]; then
	printf 'Missing FILE argument.\n'
	usage
	exit 1
fi

# cgit, sourcehut, savannah, codeberg, notabug, pagure, bitbucket, gitlab, github
# Bitbucket 	Codeberg 	GitHub 	GitLab 	Pagure 	SourceHut