aboutsummaryrefslogtreecommitdiff
path: root/local/bin/annoyme
blob: 92a42d4176de2f8ad08351082278414eac594212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

DOT_ANNOYME=~/.annoyme

for NAME in `ls "$DOT_ANNOYME" | grep -E '.pid$' | sed 's/\.pid$//'`; do
	echo -e "\033[0;31m$NAME:\033[0m" `cat "$DOT_ANNOYME/$NAME.desc"`
	echo -ne "\033[0;1m Y/n: \033[0;0m"
	read
	if [[ $REPLY =~ ^[Yy]?$ ]]; then
		if $DOT_ANNOYME/$NAME.script > "$DOT_ANNOYME/$NAME.out"; then
			kill -SIGUSR1 `cat "$DOT_ANNOYME/$NAME.pid"`
		else
			kill -SIGUSR2 `cat "$DOT_ANNOYME/$NAME.pid"`
		fi
	fi
	echo
done