projects
/
anna.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix local server for multiple applications
[anna.git]
/
ft-client
/
tests
/
common.sh
1
#!/bin/bash
2
3
#############
4
# VARIABLES #
5
#############
6
tmpdir=$(mktemp -d)
7
8
9
#############
10
# FUNCTIONS #
11
#############
12
13
_exit () {
14
echo
15
echo $1
16
echo
17
rm -rf $tmpdir
18
exit 1
19
}
20
21
sigint_handler() {
22
_exit "Script interrupted. Cleanup & exit ..."
23
}
24
25
#############
26
# EXECUTION #
27
#############
28
29
# Trap sigint signal:
30
trap sigint_handler SIGINT