pbowden-msft / MAUCacheAdmin

Microsoft AutoUpdate Cache Admin
70 stars 15 forks source link

"function: not found" under sh on Ubuntu 16.04.1 #4

Closed gabrielsanna closed 7 years ago

gabrielsanna commented 7 years ago

When running MAUCacheAdmin under Ubuntu 16.04.1, I got the error /usr/local/MAUCacheAdmin: 33: /usr/local/MAUCacheAdmin: function: not found. This is because the function keyword is specific to bash—under the sh shell, parenthesis are expected.

Changing the shebang to #!/bin/bash fixed the problem. You could also make the syntax more portable by changing the functions to the proper parenthetical form, i.e.:

foo () {
echo "hello world" }

dnikles commented 7 years ago

This was fixed in bug #2 looks like it regressed

pbowden-msft commented 7 years ago

Fixed function naming in 1.37