]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Ensure directories can only be made with printable characters
authorRyan S. Brown <sb@ryansb.com>
Sun, 7 Feb 2016 02:06:08 +0000 (21:06 -0500)
committerRyan S. Brown <sb@ryansb.com>
Sun, 7 Feb 2016 02:06:08 +0000 (21:06 -0500)
In situations where `ls` colors directories incorrectly, the `$module`
variable contains unprintable characters. This causes directories to be
impossible to `cd` into normally, and is generally a pain.

buildall.bash

index 4f5aaa9de530f357d34c0aa1f2c3259cdf44ac9e..a8c393b58eea7c8b7c09317d0afd08b926675716 100755 (executable)
@@ -31,7 +31,8 @@ main() {
        # Create permutation directories
        # Then run cmake, and run each build permutation
        # Keeping track of how many builds failed/passed
-       for module in $scanModules; do
+       for mod in $scanModules; do
+               module=$(tr -dc "[:print:]" <<< "$mod")
                # Create directory, but do not error if it exists already
                mkdir -p build/$module
                cd build/$module