aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_script_exit
blob: 81fe2c855e599b3050f7aaa8e30865524a682eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

exit_program(){
#    cd $curdir
#    if [ "$3" == "save_log" ]
#    then
#        tar cvfz $curdir/$(basename $tempdir)-$launch_timestamp.tgz $tempdir
#    fi
#    rm -rf $tempdir
    if [ $1 -ne 0 ]
    then
        logit "EXIT" "$2 ($1)"
    else
        logit "EXIT" "$2"
    fi
    exit $1
}