Update gitignore to allow env.sh

This commit is contained in:
Alex Holliday
2024-10-25 12:21:55 +08:00
parent bad552974e
commit d430f1d13e
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -24,3 +24,5 @@ dist-ssr
*.sw?
.env
!env.sh
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
for i in $(env | grep UPTIME_APP_)
do
key=$(echo $i | cut -d '=' -f 1)
value=$(echo $i | cut -d '=' -f 2-)
echo $key=$value
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
done