summaryrefslogtreecommitdiff
path: root/process-static
diff options
context:
space:
mode:
authorsmdyv <88971341+smdyv@users.noreply.github.com>2023-07-13 16:51:50 +0200
committerDaniel Micay <danielmicay@gmail.com>2023-07-13 16:08:16 -0400
commit4430036ea2b54e416b0375d25c322ba066d67084 (patch)
treec890b1bb12f390470c03fcc250b9bd5f796d63e1 /process-static
parent0a1c6a0dbb8f266ea04b86e4045337fbb66a942c (diff)
Change string markings for replacements
Diffstat (limited to 'process-static')
-rwxr-xr-xprocess-static10
1 files changed, 5 insertions, 5 deletions
diff --git a/process-static b/process-static
index 5e891dc8..c3176328 100755
--- a/process-static
+++ b/process-static
@@ -49,14 +49,14 @@ for file in static-tmp/**/*.css static-tmp/js/*.js static-tmp/**/!(bimi|favicon)
dest="$(dirname $file)/$hash.$(basename $file)"
if [[ $file == *.css ]]; then
- replace+=";s@{{css|/${file#*/}}}@<link rel=\"stylesheet\" href=\"/${dest#*/}\" integrity=\"$sri_hash\"/>@g"
+ replace+=";s@\[\[css|/${file#*/}\]\]@<link rel=\"stylesheet\" href=\"/${dest#*/}\" integrity=\"$sri_hash\"/>@g"
elif [[ $file == *.js ]]; then
- replace+=";s@{{js|/${file#*/}}}@<script type=\"module\" src=\"/${dest#*/}\" integrity=\"$sri_hash\"></script>@g"
+ replace+=";s@\[\[js|/${file#*/}\]\]@<script type=\"module\" src=\"/${dest#*/}\" integrity=\"$sri_hash\"></script>@g"
fi
mv "$file" "$dest"
- replace+=";s@{{integrity|/${file#*/}}}@${sri_hash}@g"
- replace+=";s@{{path|/${file#*/}}}@/${dest#*/}@g"
+ replace+=";s@\[\[integrity|/${file#*/}\]\]@${sri_hash}@g"
+ replace+=";s@\[\[path|/${file#*/}\]\]@/${dest#*/}@g"
done
sed -i "$replace" static-tmp/**/*.html nginx-tmp/nginx.conf nginx-tmp/snippets/preload.conf
@@ -67,7 +67,7 @@ for device in ${devices[@]}; do
for channel in ${channels[@]}; do
metadata=$(curl -s $RELEASES_BASE/$device-$channel)
build_number=$(echo -n $metadata | cut -d ' ' -f 1)
- replace+=";s@{{$device-$channel-BUILD_NUMBER}}@$build_number@g"
+ replace+=";s@\[\[$device-$channel-BUILD_NUMBER\]\]@$build_number@g"
done
done
sed -i "$replace" static-tmp/releases.html