-
Notifications
You must be signed in to change notification settings - Fork 6
/
gentoo.config
executable file
·59 lines (49 loc) · 1.52 KB
/
gentoo.config
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
source ${HOME}/.bashrc
################################################################################
if [[ -x ${1} ]]; then
source "${1}"
shift
fi
if { [[ -z ${_SYSTEMED} ]] || ! ${_SYSTEMED}; }; then
echo -en "\n"
echo -en ">>> THE GARYOS SYSTEM SCRIPT MUST BE THE FIRST ARGUMENT <<<\n"
echo -en ">>> OR YOU CAN USE THE SYSTEM SCRIPT TO RUN THIS ONE <<<\n"
echo -en "\n"
exit 1
fi
################################################################################
function default_header {
echo -en "\n"
echo -en ">>> RUNNING DEFAULT CONFIGURATION SCRIPT <<<\n"
echo -en "\n"
echo -en ">>> SCRIPT: ${_SELF} (${@}) <<<\n"
echo -en ">>> TARGET: ${TARGET} <<<\n"
echo -en ">>> CHROOT: ${IS_CHROOT} <<<\n"
echo -en "\n"
return 0
}
########################################
function example_error {
echo -en "\n"
echo -en ">>> EXAMPLE ERROR FUNCTION OUTPUT <<<\n"
echo -en "\n"
TARGET="/" _prepare_symlinks || return 1
common_exists ${FUNCNAME} ${_SELF} || return 1
return 0
}
########################################
function default_footer {
echo -en "\n"
echo -en ">>> DEFAULT CONFIGURATION SCRIPT COMPLETE <<<\n"
echo -en "\n"
return 0
}
################################################################################
default_header "${@}" || exit 1
example_error "${@}" || exit 1
default_footer "${@}" || exit 1
exit 0
################################################################################
# end of file
################################################################################