Skip to content

Commit be470f5

Browse files
committed
Fixed indentation inside functions.
1 parent 3f813a2 commit be470f5

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

utils/oscap-ssh

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -111,42 +111,42 @@ function scp_retreive_from_temp_dir {
111111
}
112112

113113
function sanity_check_arguments {
114-
if [ $# -lt 1 ]; then
115-
echo "No arguments provided."
116-
usage
117-
die
118-
elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
119-
usage
120-
die
121-
elif [ "$1" == "sudo" ] || [ "$1" == "--sudo" ]; then
122-
OSCAP_SUDO="sudo"
123-
# force pseudo-tty allocation so that users can type their password if necessary
124-
SSH_TTY_ALLOCATION_OPTION="-t"
125-
shift
126-
fi
127-
if [ $# -lt 2 ]; then
128-
echo "Missing ssh host and ssh port."
129-
usage
130-
die
131-
fi
114+
if [ $# -lt 1 ]; then
115+
echo "No arguments provided."
116+
usage
117+
die
118+
elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
119+
usage
120+
die
121+
elif [ "$1" == "sudo" ] || [ "$1" == "--sudo" ]; then
122+
OSCAP_SUDO="sudo"
123+
# force pseudo-tty allocation so that users can type their password if necessary
124+
SSH_TTY_ALLOCATION_OPTION="-t"
125+
shift
126+
fi
127+
if [ $# -lt 2 ]; then
128+
echo "Missing ssh host and ssh port."
129+
usage
130+
die
131+
fi
132132
}
133133

134134
function check_oscap_arguments {
135-
if [ "$1" == "--v" ] || [ "$1" == "--version" ]; then
136-
true
137-
elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
138-
true
139-
elif [ "$1" == "info" ]; then
140-
true
141-
elif [ "$1 $2" == "xccdf eval" ]; then
142-
true
143-
elif [ "$1 $2" == "oval eval" ]; then
144-
true
145-
elif [ "$1 $2" == "oval collect" ]; then
146-
true
147-
else
148-
die "This script only supports '-h', '--help', '--v', '--version', 'info', 'xccdf eval', 'oval eval' and 'oval collect'."
149-
fi
135+
if [ "$1" == "--v" ] || [ "$1" == "--version" ]; then
136+
true
137+
elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
138+
true
139+
elif [ "$1" == "info" ]; then
140+
true
141+
elif [ "$1 $2" == "xccdf eval" ]; then
142+
true
143+
elif [ "$1 $2" == "oval eval" ]; then
144+
true
145+
elif [ "$1 $2" == "oval collect" ]; then
146+
true
147+
else
148+
die "This script only supports '-h', '--help', '--v', '--version', 'info', 'xccdf eval', 'oval eval' and 'oval collect'."
149+
fi
150150
}
151151

152152
sanity_check_arguments "$@"

0 commit comments

Comments
 (0)