|
@@ -1,7 +1,7 @@
|
|
|
#!/bin/sh
|
|
|
|
|
|
#
|
|
|
-# Copyright © 2015-2021 the original authors.
|
|
|
+# Copyright © 2015-2021 the original authors.
|
|
|
#
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
# you may not use this file except in compliance with the License.
|
|
@@ -32,10 +32,10 @@
|
|
|
# Busybox and similar reduced shells will NOT work, because this script
|
|
|
# requires all of these POSIX shell features:
|
|
|
# * functions;
|
|
|
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
|
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
|
-# * compound commands having a testable exit status, especially «case»;
|
|
|
-# * various built-in commands including «command», «set», and «ulimit».
|
|
|
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
|
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
|
+# * compound commands having a testable exit status, especially «case»;
|
|
|
+# * various built-in commands including «command», «set», and «ulimit».
|
|
|
#
|
|
|
# Important for patching:
|
|
|
#
|
|
@@ -205,6 +205,12 @@ set -- \
|
|
|
org.gradle.wrapper.GradleWrapperMain \
|
|
|
"$@"
|
|
|
|
|
|
+# Stop when "xargs" is not available.
|
|
|
+if ! command -v xargs >/dev/null 2>&1
|
|
|
+then
|
|
|
+ die "xargs is not available"
|
|
|
+fi
|
|
|
+
|
|
|
# Use "xargs" to parse quoted args.
|
|
|
#
|
|
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|