aboutsummaryrefslogtreecommitdiff
path: root/scripts/update-env-srcs
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-08-04 21:01:27 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-08-05 11:50:12 +0200
commit46ac53e11b49a7f9cdb92c3559b05f41ce90122f (patch)
tree2d9d2a32c03442d5fb4f0427e8c3f381f80d6c92 /scripts/update-env-srcs
parent584456e736bf730eff296da1d472a562a6752f46 (diff)
downloadbycs-sol-46ac53e11b49a7f9cdb92c3559b05f41ce90122f.tar.gz
bycs-sol-46ac53e11b49a7f9cdb92c3559b05f41ce90122f.zip
make: create symlinks to build flavor files
This allows the editor to pick up all the code of the current build flavor.
Diffstat (limited to 'scripts/update-env-srcs')
-rwxr-xr-xscripts/update-env-srcs8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/update-env-srcs b/scripts/update-env-srcs
new file mode 100755
index 0000000..d75f84f
--- /dev/null
+++ b/scripts/update-env-srcs
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+SRC=$1
+MODE=$2
+
+grep -Eho '\./.*-ENV\.[^"]*' "${SRC}"/* | sort | uniq | while read -r f; do
+ ln -sf "$(printf %s "$f" | sed "s/ENV/${MODE}/")" "${SRC}"/"$f"
+done