add config file if not exists
This commit is contained in:
parent
639980abdb
commit
e2ec43a0fe
19
envs
19
envs
|
@ -23,10 +23,11 @@
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
|
|
||||||
PROGNAME=${0##*/}
|
PROGNAME=${0##*/}
|
||||||
VERSION="0.0.3"
|
VERSION="0.0.4"
|
||||||
|
|
||||||
INFO_FILE="$(pwd)/.envs"
|
INFO_FILE="$(pwd)/.envs"
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
clean_up() { # Perform pre-exit housekeeping
|
clean_up() { # Perform pre-exit housekeeping
|
||||||
return
|
return
|
||||||
|
@ -161,6 +162,22 @@ sudo envs approve
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# add default config if not exists
|
||||||
|
if [ ! -f "$INFO_FILE" ]; then
|
||||||
|
cat << EOF > "$INFO_FILE"
|
||||||
|
#
|
||||||
|
# ENVS.NET - user information config
|
||||||
|
#
|
||||||
|
# here you can add more details to youre users_info.json part
|
||||||
|
#
|
||||||
|
desc=a short describtion or message
|
||||||
|
|
||||||
|
git=
|
||||||
|
mastodon=
|
||||||
|
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Trap signals
|
# Trap signals
|
||||||
trap "signal_exit TERM" TERM HUP
|
trap "signal_exit TERM" TERM HUP
|
||||||
|
|
Loading…
Reference in New Issue