Cleanup: standardization of indentations in tsock_texte and tsock_video

This commit is contained in:
Guillaume Averlant 2018-05-03 18:41:58 +02:00
parent 95be64764a
commit 3f7c447bef
2 changed files with 34 additions and 34 deletions

View file

@ -7,22 +7,22 @@ protocol="tcp"
usage() { echo "Usage: $0 [-p|-s]" 1>&2; exit 1; } usage() { echo "Usage: $0 [-p|-s]" 1>&2; exit 1; }
while getopts "pst:" o; do while getopts "pst:" o; do
case "${o}" in case "${o}" in
p) p)
puits=true puits=true
;; ;;
s) s)
sourc=true sourc=true
;; ;;
*) *)
usage usage
;; ;;
esac esac
done done
if ([ "$puits" = true ] && [ "$sourc" = true ]) || ([ "$puits" = false ] && [ "$sourc" = false ]) ; then if ([ "$puits" = true ] && [ "$sourc" = true ]) || ([ "$puits" = false ] && [ "$sourc" = false ]) ; then
usage usage
exit 1 exit 1
fi fi
if [ "$puits" = true ]; then if [ "$puits" = true ]; then

View file

@ -7,29 +7,29 @@ protocol="tcp"
usage() { echo "Usage: $0 [[-p|-s] [-t (tcp|mictcp)]" 1>&2; exit 1; } usage() { echo "Usage: $0 [[-p|-s] [-t (tcp|mictcp)]" 1>&2; exit 1; }
while getopts "pst:" o; do while getopts "pst:" o; do
case "${o}" in case "${o}" in
t) t)
protocol=${OPTARG} protocol=${OPTARG}
if [ "$protocol" != "tcp" ] && [ "$protocol" != "mictcp" ]; then if [ "$protocol" != "tcp" ] && [ "$protocol" != "mictcp" ]; then
usage usage
exit 1 exit 1
fi fi
;; ;;
p) p)
puits=true puits=true
;; ;;
s) s)
sourc=true sourc=true
;; ;;
*) *)
usage usage
;; ;;
esac esac
done done
if ([ "$puits" = true ] && [ "$sourc" = true ]) || ([ "$puits" = false ] && [ "$sourc" = false ]) ; then if ([ "$puits" = true ] && [ "$sourc" = true ]) || ([ "$puits" = false ] && [ "$sourc" = false ]) ; then
usage usage
exit 1 exit 1
fi fi
if [ "$puits" = true ]; then if [ "$puits" = true ]; then
@ -40,7 +40,7 @@ if [ "$puits" = true ]; then
if [ "$protocol" = "mictcp" ]; then if [ "$protocol" = "mictcp" ]; then
cd build cd build
./gateway -p -t $protocol 1234 & ./gateway -p -t $protocol 1234 &
cd .. cd ..
fi fi
fi fi