From e2ec43a0fe154101c0464ee388fedfe053a0dfe5 Mon Sep 17 00:00:00 2001 From: creme Date: Fri, 6 Sep 2019 16:30:40 +0200 Subject: [PATCH] add config file if not exists --- envs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/envs b/envs index 97fbd10..e095aea 100755 --- a/envs +++ b/envs @@ -23,10 +23,11 @@ export TERM=xterm-256color PROGNAME=${0##*/} -VERSION="0.0.3" +VERSION="0.0.4" INFO_FILE="$(pwd)/.envs" +### clean_up() { # Perform pre-exit housekeeping return @@ -161,6 +162,22 @@ sudo envs approve 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 "signal_exit TERM" TERM HUP