From 3b85f6e016d4a8af6f13ece47c96a587d9768c6e Mon Sep 17 00:00:00 2001
From: Anders Lindh Olsson <anders.lindholsson@ess.eu>
Date: Thu, 3 Nov 2022 14:14:36 +0100
Subject: [PATCH] Add alias to `setE3Env.bash` for backwards compatability

---
 CHANGELOG.md                    | 1 +
 configure/module/RULES_REQUIRE  | 1 +
 require-ess/tools/setE3Env.bash | 8 ++++++++
 3 files changed, 10 insertions(+)
 create mode 100644 require-ess/tools/setE3Env.bash

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e1a87cb..df78bef9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 * Remove `runScript`
 * Drop file extension from `build_number.sh`
 * Rename `setE3Env.bash` to `activate`
+* Add alias from `setE3Env.bash` to `activate`
 
 ## [4.0.0]
 
diff --git a/configure/module/RULES_REQUIRE b/configure/module/RULES_REQUIRE
index ce1d9799..1f7b9e52 100644
--- a/configure/module/RULES_REQUIRE
+++ b/configure/module/RULES_REQUIRE
@@ -9,6 +9,7 @@ E3_TEST_SCRIPT    := $(TOP)/tools/test_installed_modules.sh
 #
 E3_SHELL_FILES    := $(wildcard $(E3_MODULE_SRC_PATH)/tools/iocsh*)
 E3_IOC_CFG_FILES  += $(E3_MODULE_SRC_PATH)/tools/activate
+E3_IOC_CFG_FILES  += $(E3_MODULE_SRC_PATH)/tools/setE3Env.bash
 E3_IOC_CFG_FILES  += $(E3_MODULE_SRC_PATH)/tools/promptE3Env.bash
 E3_REQUIRE_CONF_FILES := $(filter-out $(FILE_FILTER), $(wildcard $(TOP)/configure/E3/*))
 
diff --git a/require-ess/tools/setE3Env.bash b/require-ess/tools/setE3Env.bash
new file mode 100644
index 00000000..2bfac7e1
--- /dev/null
+++ b/require-ess/tools/setE3Env.bash
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+# This file exists for (temporary) backwards compatability
+echo "setE3Env.bash has been deprecated, please use activate instead"
+
+DIR="${0%/*}"
+# shellcheck source=require-ess/tools/activate
+. "$DIR"/activate
-- 
GitLab