Bashisms hunt
authorThomas Pérennou (Viveris Technologie) <thomas.perennou@external.thalesgroup.com>
Mon, 16 Jun 2014 09:35:18 +0000 (11:35 +0200)
committerThomas Pérennou (Viveris Technologie) <thomas.perennou@external.thalesgroup.com>
Mon, 16 Jun 2014 09:41:15 +0000 (11:41 +0200)
install/bios/+init.sh [changed mode: 0644->0755]
install/bios/update_bios_cfg.sh
install/ipmi/update_blade_cfg.sh

old mode 100644 (file)
new mode 100755 (executable)
index 8bd351680f50e0788192e346efd9711de6970a05..e960e6f74e91eee43dbfe785f79bd07ea093616d 100755 (executable)
@@ -9,7 +9,7 @@ mydir=$(cd $mydir; pwd)
 
 # formating functions
 
-_echo () { [ "$(echo -e '')" ] && echo $@ || echo -e $@; }
+_echo () { printf "$@\n"; }
 title () { _echo "\033[0;1m$*\033[0;0m"; }
 pass () { _echo "\033[1;32m$*\033[0;0m"; }
 warn () { _echo "\033[1;33m$*\033[0;0m"; }
@@ -48,7 +48,8 @@ done
   fail "Real mode, things will really append" || \
   warn "Dummy mode, nothing will be done"
 if [ ! "$ANS" = "yes" ]; then
-  read -p "Press 'y' to continue: " ANS
+  printf "Press 'y' to continue: "
+  read ANS
   [ "$ANS" = "y" ] || exit 1
 fi
 
index 413a9ca7d178dbac2eb7c69eb216505d1b1644c3..59389e78d312fab9c01e6ccd2b4b942b21a9ee75 100755 (executable)
@@ -9,7 +9,7 @@ mydir=$(cd $mydir; pwd)
 
 # formating functions
 
-_echo () { [ "$(echo -e '')" ] && echo $@ || echo -e $@; }
+_echo () { printf "$@\n"; }
 title () { _echo "\033[0;1m$*\033[0;0m"; }
 pass () { _echo "\033[1;32m$*\033[0;0m"; }
 warn () { _echo "\033[1;33m$*\033[0;0m"; }
@@ -48,7 +48,8 @@ done
   fail "Real mode, things will really append" || \
   warn "Dummy mode, nothing will be done"
 if [ ! "$ANS" = "yes" ]; then
-  read -p "Press 'y' to continue: " ANS
+  printf "Press 'y' to continue: "
+  read ANS
   [ "$ANS" = "y" ] || exit 1
 fi