-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce CLI scripts to one-liners (#30759)
This commit reduces the Linux CLI scripts to one-liners by moving all of the redundant logic to an elasticsearch-cli script. This commit is only the Linux side, a follow-up will do this for Windows too.
- Loading branch information
1 parent
dcf0f9f
commit 3ce2297
Showing
14 changed files
with
42 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e -o pipefail | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
IFS=';' read -r -a additional_sources <<< "$ES_ADDITIONAL_SOURCES" | ||
for additional_source in "${additional_sources[@]}" | ||
do | ||
source "`dirname "$0"`"/$additional_source | ||
done | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
$1 \ | ||
"${@:2}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.common.settings.KeyStoreCli \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.plugins.PluginCli \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.index.translog.TranslogToolCli \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters