generate_group_vars_sample.sh: fix script indent

Using indent of 2 on the entire script.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/1516/head
Sébastien Han 2017-05-15 10:38:36 +02:00
parent 2106745343
commit 7fddcad8ea
1 changed files with 8 additions and 8 deletions

View File

@ -7,13 +7,13 @@ basedir=$(dirname "$0")
for role in "$basedir"/roles/ceph-*; do
rolename=$(basename "$role")
if [[ $rolename == "ceph-common" ]]; then
output="all.yml.sample"
output="all.yml.sample"
elif [[ $rolename == "ceph-agent" ]]; then
output="agent.yml.sample"
output="agent.yml.sample"
elif [[ $rolename == "ceph-fetch-keys" ]]; then
output="ceph-fetch-keys.yml.sample"
output="ceph-fetch-keys.yml.sample"
else
output="${rolename:5}s.yml.sample"
output="${rolename:5}s.yml.sample"
fi
cat <<EOF > "$basedir"/group_vars/"$output"
@ -29,16 +29,16 @@ dummy:
EOF
defaults="$role"/defaults/main.yml
if [[ ! -f $defaults ]]; then
continue
continue
fi
if [ "$(uname)" == "Darwin" ]; then
sed '/^---/d; s/^\([A-Za-z[:space:]]\)/#\1/' \
"$defaults" >> "$basedir"/group_vars/"$output"
sed '/^---/d; s/^\([A-Za-z[:space:]]\)/#\1/' \
"$defaults" >> "$basedir"/group_vars/"$output"
echo >> "$basedir"/group_vars/"$output"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
sed '/^---/d; s/^\([A-Za-z[:space:]].\+\)/#\1/' \
"$defaults" >> "$basedir"/group_vars/"$output"
"$defaults" >> "$basedir"/group_vars/"$output"
echo >> "$basedir"/group_vars/"$output"
else
echo "Unsupported platform"