OpenSearch/migrate-plugins.sh
Lee Hinman 24d91298db Create skeleton for plugin split (elastic/x-pack-elasticsearch#3233)
This creates a basic skeleton for the plugin split by adding folders and example
`build.gradle` files. It also includes a non-implemented `migrate-plugins.sh`
script that we can fill in at a later time.

Relates to elastic/x-pack-elasticsearch#2925

Original commit: elastic/x-pack-elasticsearch@2ab035d6b6
2017-12-08 09:41:32 -07:00

33 lines
890 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License;
# you may not use this file except in compliance with the Elastic License.
set -euo pipefail
export SUCCESS=false
finish() {
if [ $SUCCESS != "true" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Script did NOT complete successfully!"
echo "It likely left the working tree in an unclean state."
echo "Please clean up before re-running the script."
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
else
echo "Migration finished successfully."
fi
}
trap finish EXIT
echo "Migrating..."
# TODO: implement actual moving of plugins
# Migration has been successful
export SUCCESS=true
echo "Done."