summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/mmi
blob: 959dd323e5a019ea5e2cd9be232aeb6cd586bbd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

mi () {
	sudo make -B install
}

origin="$PWD"
cmd='mi'

while getopts q opt; do
	case $opt in
		q) cmd='qmake6;mi';;
		\?) exit 1;;
	esac
done
shift $((OPTIND-1))

if [ -z "$1" ]; then
	eval "$cmd"
else
	for dir ; do
		cd "$dir" || exit
		eval "$cmd"
		cd "$origin" || exit
	done
fi