[Lldb-commits] [Patch][Please Review] Fix bashisms in swig scripts

Jason Molenda jmolenda at apple.com
Wed Sep 26 16:58:00 PDT 2012


I don't think it really makes a difference but keep in mind that the test(1) command uses -eq for numeric comparisons and = for string comparisons.  So this is correct,

-if [ ${SWIG}a == a ]
+if [ ${SWIG}a = a ]


but this is technically not,

-    if [ $Debug == 1 ]
+    if [ $Debug = 1 ]


J

On Sep 26, 2012, at 4:26 PM, "Malea, Daniel" <daniel.malea at intel.com> wrote:

> Hi Filipe,
> 
> I recently noticed an issue with the SWIG generation scripts when building on Ubuntu recently.
> 
> The problem is due to dash (the default shell) not accepting == string equality operator as POSIX requires a single = to be used. Please review the attached patch that resolves the problem by replacing == with = as needed.
> 
> 
> Thanks,
> Dan
> 
> <lldb_script_bashism_fixes.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list