2011-02-20 01:07:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
|
|
|
#
|
|
|
|
# This file is part of cdist.
|
|
|
|
#
|
|
|
|
# cdist is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# cdist is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Give the user an introduction into cdist
|
|
|
|
#
|
|
|
|
|
|
|
|
. cdist-config
|
|
|
|
set -eu
|
|
|
|
|
2011-02-26 19:57:04 +00:00
|
|
|
banner="cdist-quickstart>"
|
|
|
|
continue="Press enter to continue or ctrl-c to abort."
|
|
|
|
|
2011-02-20 01:07:56 +00:00
|
|
|
__prompt()
|
|
|
|
{
|
2011-02-26 19:57:04 +00:00
|
|
|
echo -n "$banner" "$@"
|
2011-02-20 01:07:56 +00:00
|
|
|
read answer
|
|
|
|
}
|
|
|
|
|
2011-02-26 19:57:04 +00:00
|
|
|
cat << eof
|
|
|
|
$banner cdist version $__cdist_version
|
|
|
|
|
|
|
|
Welcome to the interactive guide to cdist!
|
|
|
|
This is the interactive tutorial and beginners help for cdist.
|
|
|
|
|
|
|
|
|
|
|
|
eof
|
|
|
|
__prompt "$continue"
|
|
|
|
|
2011-02-20 01:07:56 +00:00
|
|
|
cat << eof
|
|
|
|
|
2011-02-26 19:57:04 +00:00
|
|
|
To make any use of cdist, we need to create the configuration base, which
|
|
|
|
can normally be found below ${__cdist_conf_dir}:
|
2011-02-20 01:07:56 +00:00
|
|
|
|
2011-02-26 19:57:04 +00:00
|
|
|
${__cdist_explorer_dir}: Contains explorer, which explore the target
|
|
|
|
${__cdist_manifest_dir}: Contains manifests which define types being used
|
|
|
|
${__cdist_manifest_init}: The first manifest executed (i.e. cdist entry point)
|
|
|
|
${__cdist_type_dir}: Contains types
|
2011-02-20 01:07:56 +00:00
|
|
|
|
|
|
|
eof
|
2011-02-26 19:57:04 +00:00
|
|
|
__prompt "$continue"
|
|
|
|
|
|
|
|
set -x
|
|
|
|
mkdir ${__cdist_conf_dir}
|
|
|
|
mkdir ${__cdist_explorer_dir}
|
|
|
|
mkdir ${__cdist_manifest_dir}
|
|
|
|
touch ${__cdist_manifest_init}
|
|
|
|
mkdir ${__cdist_type_dir}
|
|
|
|
set +x
|