forked from trimstray/sandmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings
39 lines (30 loc) · 1.4 KB
/
settings
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
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# shellcheck shell=bash
################################################################################
################## The configuration parameters of the script ##################
################################################################################
# Bash 'Strict Mode':
# errexit - exit the script if any statement returns a non-true return value
# pipefail - exit the script if any command in a pipeline errors
# nounset - exit the script if you try to use an uninitialised variable
# xtrace - display debugging information
set -o pipefail
# Internal field separator (more flexible):
# IFS_ORIG="$IFS"
# IFS_HACK=$'\n\t'
# IFS="$IFS_HACK"
# PATH env variable setup:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Setting permissions in the script environment:
# 0022 - less restrictive settings (default value)
# 0027 - for better security than above
# 0077 - only for user access (more restrictive)
umask 0027
# Catch the listed SIGNALS, which may be signal names with or without the SIG
# prefix, or signal numbers. By default, only the signal 0 or EXIT is supported.
trap "_get_trap_SIG EXIT" EXIT
# shellcheck disable=SC2173
trap "_get_trap_SIG SIGS" SIGHUP SIGTERM SIGKILL SIGINT
# Set properly terminal size if you use X-Session.
_rows=44 ; _cols=180
if [ ! -z "${DISPLAY:-}" ]; then resize -s "$_rows" "$_cols" > /dev/null ; fi