summaryrefslogtreecommitdiff
path: root/jh-mksource.sh
blob: 31e40c793d31d1b3187822f4807e08799ff248d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

quote () {
	local quoted=${1//\'/\'\\\'\'};
	printf "'%s'" "$quoted"
}

quote_args() {
	for arg in "$@"; do
		quote "$arg"
		printf ' '
	done
}

echo "type mksource &>/dev/null && mksource; jh checksource $(quote_args "$@")"