fix bashism in several scripts, thanks ft 0.9.13
authorMichael Prokop <mika@grml.org>
Tue, 6 Feb 2007 19:48:27 +0000 (20:48 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Feb 2007 19:48:27 +0000 (20:48 +0100)
12 files changed:
debian/changelog
usr_bin/attach-screen
usr_bin/grml-config-user
usr_bin/grml-lang
usr_bin/grml-mutt
usr_bin/grml-muttng
usr_bin/grml-slrn
usr_bin/grml-start
usr_bin/say
usr_sbin/grml-config
usr_sbin/grml-config-root
usr_sbin/make_chroot_jail

index b7caddd..ab90e3b 100644 (file)
@@ -1,3 +1,22 @@
+grml-scripts (0.9.13) unstable; urgency=low
+
+  * The 'fix bashism in several scripts' release. Thanks
+    to ft for the patches!
+
+    - say: fix bashism [Closes: issue114]
+    - make_chroot_jail: fix bashism [Closes: issue113]
+    - grml-start: fix bashism [Closes: issue112]
+    - grml-slrn: fix bashism [Closes: issue111]
+    - grml-muttng: fix bashism [Closes: issue110]
+    - grml-mutt: fix bashism [Closes: issue109]
+    - grml-lang: fix bashism [Closes: issue108]
+    - grml-config: fix bashism [Closes: issue107]
+    - grml-config-user: fix bashism [Closes: issue106]
+    - grml-config-root: fix bashism [Closes: issue105]
+    - attach-screen: fix bashism [Closes: issue103]
+
+ -- Michael Prokop <mika@grml.org>  Tue,  6 Feb 2007 20:38:40 +0100
+
 grml-scripts (0.9.12) unstable; urgency=low
 
   * Update make_chroot_jail script (see
index ba55fb5..967be68 100755 (executable)
@@ -8,7 +8,7 @@
 ################################################################################
 
 # -U option basically means "terminal does not have UTF-8 support"
-if [ "$1" == "-U" ]; then
+if [ x$1 = "x-U" ]; then
     unset LC_CTYPE
 fi
 
index 360e359..db261be 100755 (executable)
@@ -13,7 +13,7 @@ PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
 DIALOG=$(which dialog)
 PN=$(basename $0)
 
-function allover() {
+allover() {
 MENU=$($DIALOG --stdout --clear --title "$PN" --menu \
 "Configure userland tools." 0 0 0 \
 "grml-mutt" "Configure the mutt MUA" \
index 68c8a4d..2ded458 100755 (executable)
@@ -12,25 +12,25 @@ usage(){
     echo "supported values: at, de, ch, us"
 }
 
-if [[ $# -lt "1" ]] ; then
+if [ $# -lt "1" ] ; then
    usage
    exit -1
 fi
 
-if [[ $DISPLAY == "" ]] ;then
-  if [[ "$1" == "de" ]] ; then
+if [ -z "$DISPLAY" ] ;then
+  if [ "$1" = "de" ] ; then
     echo "Loading keymap for Germany..."
     sudo loadkeys i386/qwertz/de-latin1-nodeadkeys.kmap.gz
     echo -e "\nDone."
-  elif [[ "$1" == "at" ]] ; then
+  elif [ "$1" = "at" ] ; then
     echo "Loading keymap for Austria..."
     sudo loadkeys i386/qwertz/de-latin1-nodeadkeys.kmap.gz
     echo -e "\nDone."
-  elif [[ "$1" == "ch" ]] ; then
+  elif [ "$1" = "ch" ] ; then
     echo "Loading keymap for Switzerland..."
     sudo loadkeys i386/qwertz/sg-latin1.kmap.gz
     echo -e "\nDone."
-  elif [[ "$1" == "us" ]] ; then
+  elif [ "$1" = "us" ] ; then
     echo 'Loading keymap us...'
     # sudo loadkeys /etc/console/boottime.kmap.gz
     sudo loadkeys i386/qwerty/us-latin1.kmap.gz
@@ -41,23 +41,23 @@ Notice: Use loadkeys on console and setxkbmap when running X for
 modifying keyboard layout. Adjust \$LANG and \$LC_ALL for setting locales." ; exit 1
   fi
 else
-  if [[ $# == "0" ]] ; then
+  if [ $# = 0 ] ; then
       echo "Usage: $0 <language>"
       echo "supported values: at, de, ch, us"
   else
-    if [[ "$1" == "de" ]] ; then
+    if [ "$1" = "de" ] ; then
       echo "Loading keymap for Germany..."
       [ -r $HOME/.Xmodmap.german ] && xmodmap $HOME/.Xmodmap.german || setxkbmap de
       echo -e "\nDone."
-    elif [[ "$1" == "at" ]] ; then
+    elif [ "$1" = "at" ] ; then
       echo "Loading keymap for Austria..."
       setxkbmap de
       echo -e "\nDone."
-    elif [[ "$1" == "ch" ]] ; then
+    elif [ "$1" = "ch" ] ; then
       echo "Loading keymap for Switzerland..."
       setxkbmap ch
       echo -e "\nDone."
-    elif [[ "$1"  == "us" ]] ; then
+    elif [ "$1"  = "us" ] ; then
       echo 'Loading keymap us...'
       [ -r $HOME/.Xmodmap ] && xmodmap $HOME/.Xmodmap || setxkbmap us
       echo -e "\nDone."
index 135ad3c..589573e 100755 (executable)
@@ -362,7 +362,7 @@ case $retval in
 esac
 
 writecolors() {
-  if [ "$COLOR" == 'light' ] ; then
+  if [ "$COLOR" = 'light' ] ; then
     lightcolors
   fi
 }
index c539562..55cc240 100755 (executable)
@@ -389,7 +389,7 @@ case $retval in
 esac
 
 writecolors() {
-  if [ "$COLOR" == 'light' ] ; then
+  if [ "$COLOR" = 'light' ] ; then
     lightcolors
   fi
 }
index 8ba20f5..8dea352 100755 (executable)
@@ -293,10 +293,10 @@ case $retval in
 esac
 
 writecolors() {
-  if [ "$COLOR" == 'light' ] ; then
+  if [ "$COLOR" = 'light' ] ; then
     lightcolors
   fi
-  if [ "$COLOR" == 'dark' ] ; then
+  if [ "$COLOR" = 'dark' ] ; then
     darkcolors
   fi
 }
index 9bc28cc..415568a 100755 (executable)
@@ -7,8 +7,8 @@
 # Latest change: Fre Jul 07 22:42:40 CEST 2006 [mika]
 ################################################################################
 
- (( ${+BROWSER} )) || BROWSER="w3m"
-#(( ${+BROWSER} )) || BROWSER="links2 -driver fb"
+BROWSER=${BROWSER:-w3m}
+#BROWSER=${BROWSER:-links2 -driver fb}
 exec $BROWSER /usr/share/doc/grml-docs/startpage.html
 
 ## END OF FILE #################################################################
index 4985ce6..9041d08 100755 (executable)
@@ -4,10 +4,10 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Son Jän 30 14:38:30 CET 2005 [mika]
+# Latest change: Die Feb 06 20:38:24 CET 2007 [mika]
 ################################################################################
 
-if [[ "$#" -eq '0' ]] ; then
+if [ $# -eq 0 ] ; then
   echo "Usage: $0 <text_to_say>"
   exit -1
 fi
index 208beb8..b7d1a2f 100755 (executable)
@@ -19,7 +19,7 @@ else
    DEFAULTITEM=root
 fi
 
-function allover() {
+allover() {
 MENU=$($DIALOG --stdout --clear --title "$PN" --default-item $DEFAULTITEM --menu \
 "Please select the scripts you would like to run.
 
index 55a5287..f4d5515 100755 (executable)
@@ -19,7 +19,7 @@ then
         exit 100
 fi
 
-function allover() {
+allover() {
 MENU=$($DIALOG --stdout --clear --title "$PN" --menu \
 "Configure your grml system.
 
index cd47e38..5ac16c1 100755 (executable)
@@ -261,7 +261,7 @@ Copying files in $CHROOT_USERNAME's \$HOME to \"$HOMEDIR\"
 usermod -d "$HOMEDIR" -m -s "$SHELL" $CHROOT_USERNAME && chmod 700 "$HOMEDIR"
 fi
 
-if [ "$CREATEUSER" == "yes" ] ; then {
+if [ "$CREATEUSER" = "yes" ] ; then {
 echo "Adding User \"$CHROOT_USERNAME\" to system"
 useradd -m -d "$HOMEDIR" -s "$SHELL" $CHROOT_USERNAME && chmod 700 "$HOMEDIR"