Commits

Markus Tzoe committed ab7bc0f

fix tokenize and shellscript

Comments (0)

Files changed (2)

         tokenno++;
         tokens[tokenno] = line;
         line = line + strcspn(line, " \t");
-        *line = (char) 0;
-        line++;
+        // *line = (char) 0;
+        // line++;
+        if (*line != '\0')
+            *line++ = '\0';
 
         /* We ignore everything after a # */
         if (*tokens[tokenno] == '#') {
     fi
     # FIXME: This env variable is only meaningful on Mac OSX, so it would be better
     #        not to set it at all on other platforms.
-    if [ $HOST == "Darwin" ];then
+    if [ $HOST = "Darwin" ];then
       export DYLD_FORCE_FLAT_NAMESPACE=1
     fi
   ;;
         unset @LDPRELOAD@
         # FIXME: This env variable is only meaningful on Mac OSX, so it would be better
         #        not to set it at all on other platforms.
-        if [ $HOST == "Darwin" ];then
+        if [ $HOST = "Darwin" ];then
           unset DYLD_FORCE_FLAT_NAMESPACE=1
         fi
     fi
       echo $@LDPRELOAD@ | grep -q "${SHLIB}" || \
       export @LDPRELOAD@="${SHLIB} $@LDPRELOAD@"
     fi
-    if [ $HOST == "Darwin" ];then
+    if [ $HOST = "Darwin" ];then
       export DYLD_FORCE_FLAT_NAMESPACE=1
     fi