Add support for Git for Windows / MINGW users
If you install Git for Windows (https://git-for-windows.github.io/) you get a console ,either CMD or MINTT, which returns MINGW* for uname -s. So if you run blackbox_addadmin or the other commands, you'll get: "ERROR: Unknown OS. Exiting." I've simply added MINGW* to the Linux and CYGWIN checks and it seems to work fine. NOTE: I didn't touch tools/test_functions.sh allthough it should probably be updated as well.
This commit is contained in:
@@ -371,7 +371,7 @@ function md5sum_file() {
|
||||
Darwin )
|
||||
md5 -r "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
Linux | CYGWIN*)
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
md5sum "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
* )
|
||||
@@ -387,7 +387,7 @@ function cp_permissions() {
|
||||
Darwin )
|
||||
chmod $( stat -f '%p' "$1" ) "${@:2}"
|
||||
;;
|
||||
Linux | CYGWIN* )
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
chmod --reference "$1" "${@:2}"
|
||||
;;
|
||||
* )
|
||||
|
||||
Reference in New Issue
Block a user